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@gmail.com