[Bug 38337] clang compiling warnings
wine-bugs at winehq.org
wine-bugs at winehq.org
Tue Nov 10 12:44:09 CST 2015
https://bugs.winehq.org/show_bug.cgi?id=38337
--- Comment #6 from Nikolay Sivov <bunglehead at gmail.com> ---
(In reply to Sergey Isakov from comment #5)
> More warnings:
> -----
> /programs/winedbg/gdbproxy.c:2146:23: warning: comparison of
> constant -1 with expression of type 'enum be_xpoint_type' is always
> false
> [-Wtautological-constant-out-of-range-compare]
> if (xpt->type == -1)
> ~~~~~~~~~ ^ ~~
I don't think this warning is accurate.
> -------
> /programs/winemine/main.c:83:9: warning: logical not is only
> applied to the left hand side of this comparison
> [-Wlogical-not-parentheses]
> if( !RegQueryValueExW( hkey, xposW, NULL, &type,
> ^
I sent a patch for this.
> --------
> /dlls/xmllite/tests/reader.c:245:20: warning: comparison of
> constant -1 with expression of type 'XmlReadState' (aka 'enum
> XmlReadState') is always false
> [-Wtautological-constant-out-of-range-compare]
> if (exp_broken == -1)
> ~~~~~~~~~~ ^ ~~
Same.
> ----------
> /dlls/wintab32/context.c:233:31: warning: taking the absolute
> value of unsigned type 'unsigned int' has no effect [-Wabsolute-value]
> packet->pkY = abs(ptr->context.lcOutExtY + packet->pkY);
> ^
> ------------
> /dlls/winmm/tests/mixer.c:637:25: warning: taking the absolute
> value of unsigned type 'unsigned int' has no effect [-Wabsolute-value]
> if (abs(ret_value.dwValue-new_value.dwValue)<=1) {
> ^
> -----------
> /dlls/winmm/joystick.c:107:6: warning: taking the absolute
> value of unsigned type 'unsigned int' has no effect [-Wabsolute-value]
> abs(joy->ji.wZpos - ji.wZpos) > joy->threshold) {
> ^
Probably valid, let's see if someone picks them up.
> -----------
> /programs/winedbg/types.c:78:13: warning: variable 'bt' is used
> uninitialized whenever '||' condition is true
> [-Wsometimes-uninitialized]
> if (!types_get_info(&type, TI_GET_LENGTH, &size) ||
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ----------
This one could be ignored.
>
> Hope authors of these codes will correct own mistakes protected by LGPL.
As you said those are opensource LGPL mistakes, so fixes are welcome, not only
from original authors.
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
More information about the wine-bugs
mailing list