[vlc-devel] [PATCH] removed some signedness warnings

Toralf Niebuhr gmthor85 at aim.com
Sat Feb 27 22:45:53 CET 2010


Am 27.02.2010 um 21:39 schrieb Laurent Aimar:

> Hi,
> 
> On Sat, Feb 27, 2010, Toralf Niebuhr wrote:
>>> On Sat, Feb 27, 2010, Toralf Niebuhr wrote:
>>>> removed some signedness warnings
>>>> 
>>>> one question:
>>>> include/vlc_picture.h
>>>> I'm not sure if the attribute i_pixel_pitch from struct plane_t should be size_t instead of unsigned int.
>>> I am not sure it would be wise to apply your patch so near 1.1, as
>>> moving from signed to unsigned may have unseen consequences.
>>> 
>>> About, i_pitch, I am unsure if it can be changed to unsigned, in some place
>>> it could be possible that a negative pitch is used for bottom to top image (At
>>> least it should be checked).
>> You are probably right about i_pixel_pitch.
>> All the other variables indicate some kind of size ( length for example ) so unsigned should be the right thing.
> I didn't(nor did) say it wasn't the right thing to do or that it didn't make sense,
> but playing with unsigned variable has sides effects.
> 
> For example, with unsigned:
> if( plane->i_lines - 10 < 1 )
> {
> }
> does not do what you probably want anymore and I don't think it will generate
> a warning...
Thanks for that example.
Couldn't think of this.
I guess I'll have to do it again and check all places where it is used.
Or should it be done later after the stable release?
> That's why I said, IMO it isn't wise to change it now.
> 
> Regards,
> 
> -- 
> fenrir
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel




More information about the vlc-devel mailing list