[Chilli] compiler warning leads to build error

Steffen Dettmer steffen.dettmer at nomadrail.com
Thu Mar 21 16:50:11 UTC 2013

Dear developers,

Thanks for this nice software and all you efforts spent!

I just noted a minor issue. On Debian 6 amd64 a warning leads to a compiler error:

  main-opt.c:781: error: 'ptr' may be used uninitialized in this function

because of -Werror. The warning even seems to be a false one.

Is it intended to have -Werror in release builds? Seems -Werror is "hardcoded" in Makefile.am.

For me I just patched src/Makefile* and removed -Werror, but I write in case others could be interested in.

Best regards,


/bin/bash ../libtool --tag=CC   --mode=link x86_64-linux-gnu-gcc -D_GNU_SOURCE -Wall -Werror -fno-builtin -fno-strict-aliasing -O2 -fomit-frame-pointer -funroll-loops -pipe -I../bstring -DDEFCHILLICONF='"/etc/chilli.conf"' -DDEFPIDFILE='"/var/run/chilli.pid"' -DDEFSTATEDIR='"/var/run"' -DSBINDIR='"/usr/sbin"'   -DDEFLIBDIR='"/usr/lib/coova-chilli"' -g -O2   -o chilli_radconfig main-radconfig.o libchilli.la  ../bstring/libbstring.la  -lssl -lcrypto     -ldl -lrt

libtool: link: x86_64-linux-gnu-gcc -D_GNU_SOURCE -Wall -Werror -fno-builtin -fno-strict-aliasing -O2 -fomit-frame-pointer -funroll-loops -pipe -I../bstring -DDEFCHILLICONF=\"/etc/chilli.conf\" -DDEFPIDFILE=\"/var/run/chilli.pid\" -DDEFSTATEDIR=\"/var/run\" -DSBINDIR=\"/usr/sbin\" -DDEFLIBDIR=\"/usr/lib/coova-chilli\" -g -O2 -o .libs/chilli_radconfig main-radconfig.o  ./.libs/libchilli.so ../bstring/.libs/libbstring.so -lssl -lcrypto -ldl -lrt

x86_64-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..    -D_GNU_SOURCE -Wall -Werror -fno-builtin -fno-strict-aliasing -O2 -fomit-frame-pointer -funroll-loops -pipe -I../bstring -DDEFCHILLICONF='"/etc/chilli.conf"' -DDEFPIDFILE='"/var/run/chilli.pid"' -DDEFSTATEDIR='"/var/run"' -DSBINDIR='"/usr/sbin"'   -DDEFLIBDIR='"/usr/lib/coova-chilli"' -g -O2 -MT main-opt.o -MD -MP -MF .deps/main-opt.Tpo -c -o main-opt.o main-opt.c

cc1: warnings being treated as errors

main-opt.c: In function 'main':

main-opt.c:781: error: 'ptr' may be used uninitialized in this function

make[4]: *** [main-opt.o] Error 1

make[4]: Leaving directory `/home/steffen/tmp/coova-chilli-1.3.0/src'

make[3]: *** [all-recursive] Error 1

make[3]: Leaving directory `/home/steffen/tmp/coova-chilli-1.3.0/src'

make[2]: *** [all-recursive] Error 1

make[2]: Leaving directory `/home/steffen/tmp/coova-chilli-1.3.0'

make[1]: *** [all] Error 2

make[1]: Leaving directory `/home/steffen/tmp/coova-chilli-1.3.0'

make: *** [build] Error 2

dpkg-buildpackage: error: debian/rules build gave error exit status 2

debuild: fatal error at line 1325:

dpkg-buildpackage -rfakeroot -D -us -uc -i -b failed

steffen at vivaldi:~/tmp/coova-chilli-1.3.0-steffen (master u=) $ cat /etc/issue

Debian GNU/Linux 6.0 \n \l

steffen at vivaldi:~/tmp/coova-chilli-1.3.0-steffen (master u=) $ uname -a

Linux vivaldi 2.6.32-5-amd64 #1 SMP Sun Sep 23 10:07:46 UTC 2012 x86_64 GNU/Linux

steffen at vivaldi:~/tmp/coova-chilli-1.3.0-steffen (master u=) $ gcc --version

gcc (Debian 4.4.5-8) 4.4.5

Copyright (C) 2010 Free Software Foundation, Inc.

This is free software; see the source for copying conditions.  There is NO



777     for (numargs = 0, i=0;

 778          numargs < args_info.uamdomain_given && i < MAX_UAM_DOMAINS;

779          ++numargs) {

780       char *tb = args_info.uamdomain_arg[numargs];

781       char *tok, *str, *ptr;

782       for (str = tb ; i < MAX_UAM_DOMAINS; str = NULL) {

783         tok = strtok_r(str, ",", &ptr);

784         if (!tok) break;

785         log_dbg("uamdomain %s", tok);

786         _options.uamdomains[i++] = STRDUP(tok);

787       }

788     }

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.coova.org/pipermail/chilli/attachments/20130321/96b1ef94/attachment.html>

More information about the Chilli mailing list