xeyownt / xseticon

xseticon from Paul Evans -- http://www.leonerd.org.uk/
GNU General Public License v2.0
34 stars 13 forks source link

Avoid GCC warning about printing a Window (long) as an int #1

Closed maeveynot closed 6 years ago

maeveynot commented 6 years ago

Building xseticon on Ubuntu 18.04 (amd64), I noticed the following warning:

xseticon.c: In function ‘main’:
xseticon.c:312:39: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘Window {aka long unsigned int}’ [-Wformat=]
     printf("Have selected window 0x%08x\n", window);
                                    ~~~^
                                    %08lx

This just cleans that up.

xeyownt commented 6 years ago

Thanks for reporting! I also fixed the warning on 'strcmp'.