conformal / spectrwm

A small dynamic tiling window manager for X11.
ISC License
1.33k stars 97 forks source link

some warnings #48

Closed gonzalo- closed 9 years ago

gonzalo- commented 10 years ago

Hi guys,

With WARNINGS=yes on mk.conf

I see this:

===> Patching for spectrwm-2.5.1 ===> Configuring for spectrwm-2.5.1 ===> Building for spectrwm-2.5.1 cc -O2 -pipe -Wall -Wpointer-arith -Wuninitialized -Wstrict-prototypes -Wmissing-prototypes -Wunused -Wsign-compare -Wshadow -Wdeclaration-after-statement -std=c99 -Wmissing-prototypes -Wall -Wextra -Wshadow -Wno-uninitialized -g -Wall -Wpointer-arith -Wuninitialized -Wstrict-prototypes -Wmissing-prototypes -Wunused -Wsign-compare -Wshadow -Wdeclaration-after-statement -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -nostdinc -idirafter /usr /include -c spectrwm.c spectrwm.c: In function 'stack_master': spectrwm.c:4619: warning: 'win_g.w' may be used uninitialized in this function spectrwm.c:4619: warning: 'win_g.x' may be used uninitialized in this function spectrwm.c:4619: warning: 'win_g.y' may be used uninitialized in this function spectrwm.c:4624: warning: 'msize' may be used uninitialized in this function spectrwm.c:4624: warning: 'mwin' may be used uninitialized in this function spectrwm.c:4624: warning: 'colno' may be used uninitialized in this function spectrwm.c:4624: warning: 'split' may be used uninitialized in this function spectrwm.c:4623: warning: 'h_slice' may be used uninitialized in this function spectrwm.c:4623: warning: 'hrh' may be used uninitialized in this function spectrwm.c:4621: warning: 'stacks' may be used uninitialized in this function spectrwm.c:4621: warning: 's' may be used uninitialized in this function cc -o spectrwm spectrwm.o -lutil -L/usr/X11R6/lib -lX11 -lX11-xcb -lxcb-util -lxcb-icccm -lxcb-keysyms -lxcb-randr -lxcb-xtest -lXft -lXcursor /usr/X11R6/lib/libX11.so.16.0: warning: strcpy() is almost always misused, please use strlcpy() /usr/X11R6/lib/libX11.so.16.0: warning: strcat() is almost always misused, please use strlcat() /usr/X11R6/lib/libX11.so.16.0: warning: sprintf() is often misused, please use snprintf() mandoc -Tlint spectrwm.1 spectrwm.1:841:38: ERROR: skipping bad character spectrwm.1:841:39: ERROR: skipping bad character spectrwm.1:841:44: ERROR: skipping bad character spectrwm.1:841:45: ERROR: skipping bad character spectrwm.1:844:30: ERROR: skipping bad character spectrwm.1:844:31: ERROR: skipping bad character spectrwm.1:849:43: ERROR: skipping bad character spectrwm.1:849:44: ERROR: skipping bad character spectrwm.1:850:45: ERROR: skipping bad character spectrwm.1:850:46: ERROR: skipping bad character

LordReg commented 10 years ago

Hi gonzalo-, Not sure what OS, compiler versions, etc you are using. I don't get those warnings on with gcc 4.9.0 or clang 3.4 using the same warning flags.

All those warnings are not an issue except the 'bad character' errors on the man page. They aren't really 'errors' but it is better to use escape codes for å and π. I committed a fix.

gonzalo- commented 10 years ago

Oh sorry about the lack of information, this is the openbsd port.

Thank you.