[Patch] comctl32: fix signedness compilation warning
vlad.bespalov at jetstreamsoft.com
vlad.bespalov at jetstreamsoft.com
Fri Feb 16 03:08:36 CST 2018
When compiling with clang the following earnings are generated:
../../../dlls/comctl32/taskdialog.c:323:24: warning: taking the
absolute value of unsigned type 'unsigned int' has no effect
[-Wabsolute-value]
int diff_now = abs(line_widths[i] - line_widths[i - 1]);
^
../../../dlls/comctl32/taskdialog.c:323:24: note: remove the call to
'abs' since unsigned values cannot be negative
int diff_now = abs(line_widths[i] - line_widths[i - 1]);
^~~
../../../dlls/comctl32/taskdialog.c:332:24: warning: taking the
absolute value of unsigned type 'unsigned int' has no effect
[-Wabsolute-value]
diff_changed = abs(2 * buttons[last_button].width +
line_widths[i] - line_widths[i - 1]);
^
../../../dlls/comctl32/taskdialog.c:332:24: note: remove the call to
'abs' since unsigned values cannot be negative
diff_changed = abs(2 * buttons[last_button].width +
line_widths[i] - line_widths[i - 1]);
^~~
The patch casts first operand to (int) making intent clean.
Signed-off-by: Vlad Bespalov <vlad.botanic at gmail.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: taskdialog.c.diff
Type: text/x-diff
Size: 996 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20180216/0983f046/attachment.diff>
More information about the wine-devel
mailing list