Alexandre Julliard wrote: > Marko Nikolic <grk...@gmail.com> writes: > >> What remains is how to correctly remove warning. In this case (and there are >> many similar in the code), signed function parameter is comparing with >> values that are natively unsigned. Changing type of the parameter is not >> possible, the same if with sizeof operator. One possiblity is to add some >> temporary variable, but in my opinioin it will just unncesary bloat the code >> and is worse than casting return value of sizeof. > > In general a negative size would be an error too, so casting the sizeof > wouldn't do the right thing. Hmm ... gcc would still issue the warning even if we know that formatsize cannot be negative aka formatsize >= 0 && formatsize <= sizeof(PCMWAVEFORMAT) would still produce a warning.
bye michael