This error was reported by Valgrind:
==237870== Conditional jump or move depends on uninitialised value(s)
==237870== at 0x484AF0E: bcmp (vg_replace_strmem.c:1221)
==237870== by 0x40C9DB: update_imgs (div.c:117)
==237870== by 0x40CB4C: div_update_all (div.c:138)
==237870== by 0x420A0F: view_arrange (view.c:611)
==237870== by 0x41F88C: view_update (view.c:337)
==237870== by 0x418B59: message_root (message.c:686)
==237870== by 0x42474D: ixp_srv_writectl (srv_util.c:232)
==237870== by 0x41322E: fs_write (fs.c:513)
==237870== by 0x423462: handlereq (request.c:321)
==237870== by 0x422BFF: handlefcall (request.c:146)
==237870== by 0x4240E8: handle_conns (server.c:118)
==237870== by 0x42424C: ixp_serverloop (server.c:169)
This change fixes the following warnings:
cmd/wmii/div.c:80:6: warning: unsequenced modification and access to 'n'
cmd/wmii/message.c:231:7: warning: variable 'l' is used uninitialized whenever '&&' condition is false
cmd/wmii/message.c:240:7: warning: variable 'l' is used uninitialized whenever '&&' condition is false
This change fixes the following warning:
cmd/wmii/bar.c:149:20: warning: the comparison will always evaluate as ‘true’ for the address of ‘text’ will never be NULL
GCC switched default from -fcommon to -fno-common,
leading to the following compilation errors:
multiple definition of `argv0'
multiple definition of `display'
multiple definition of `scr'
multiple definition of `font'
multiple definition of `cnorm'
multiple definition of `csel'
multiple definition of `debugflag'
multiple definition of `debugfile'
multiple definition of `cursor'
multiple definition of `framehandler'
multiple definition of `NM'
include/stuff/util.h:109:17: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
include/stuff/util.h:109:41: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
This change fixes the following warnings:
lib/libstuff/x11/keys/parsekey.c:73:2: warning: ‘XKeycodeToKeysym’ is deprecated [-Wdeprecated-declarations]
cmd/strut/ewmh.c:23:27: warning: ‘sizeof’ on array function parameter ‘struts’ will return size of ‘Rectangle *’ {aka ‘struct Rectangle *’} [-Wsizeof-array-argument]
cmd/wmii/key.c:109:3: warning: ‘XKeycodeToKeysym’ is deprecated [-Wdeprecated-declarations]
cmd/wmii/dat.h:108:7: warning: comparison of constant ‘2’ with boolean expression is always false [-Wbool-compare]
On Ubuntu 12.04, the build was failing with the following error:
cc -o wmii9menu.out wmii9menu.o -g -ldl -L../../lib -L/usr/lib ../../lib/libstuff.a ../../lib/libregexp9.a ../../lib/libbio.a ../../lib/libfmt.a ../../lib/libutf.a /usr/local/lib/libixp.a -lXinerama -lXrender -lX11 -lXrandr
/usr/bin/ld: ../../lib/libstuff.a(xft.o): undefined reference to symbol 'dlsym@@GLIBC_2.2.5'
/usr/bin/ld: note: 'dlsym@@GLIBC_2.2.5' is defined in DSO /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/libdl.so so try adding it to the linker command line
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/libdl.so: could not read symbols: Invalid operation