[ https://issues.apache.org/jira/browse/ZOOKEEPER-374?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Patrick Hunt updated ZOOKEEPER-374: ----------------------------------- Attachment: ZOOKEEPER-374.patch fixed warning and added tests to verify > Uninitialized struct variable in C causes warning which is treated as an error > ------------------------------------------------------------------------------ > > Key: ZOOKEEPER-374 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-374 > Project: Zookeeper > Issue Type: Bug > Components: c client > Affects Versions: 3.1.1 > Environment: i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. > build 5490) > Reporter: Nitay Joffe > Priority: Trivial > Fix For: 3.2.0 > > Attachments: ZOOKEEPER-374.patch > > > nitay-joffes-macbook-pro:c nitay$ pwd > /Users/nitay/code/zookeeper/src/c > nitay-joffes-macbook-pro:c nitay$ make > make all-am > /bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. > -I./include -I./tests -I./generated -Wall -Werror -g -O2 -MT zookeeper.lo > -MD -MP -MF .deps/zookeeper.Tpo -c -o zookeeper.lo `test -f 'src/zookeeper.c' > || echo './'`src/zookeeper.c > libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests > -I./generated -Wall -Werror -g -O2 -MT zookeeper.lo -MD -MP -MF > .deps/zookeeper.Tpo -c src/zookeeper.c -fno-common -DPIC -o .libs/zookeeper.o > cc1: warnings being treated as errors > src/zookeeper.c: In function 'zoo_add_auth': > src/zookeeper.c:2378: warning: 'auth.buff' may be used uninitialized in this > function > src/zookeeper.c:2378: warning: 'auth.len' may be used uninitialized in this > function > make[1]: *** [zookeeper.lo] Error 1 > make: *** [all] Error 2 > Need to set auth.buff and auth.len to zero. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.