[Dnsmasq-discuss] Warnings about unused variables when deactivating DHCP

Matthias Fischer matthias.fischer at ipfire.org
Sat Feb 6 11:06:31 GMT 2016


Hi list,

some time ago I asked about two warnings which always come up while
compiling 'dnsmasq' with different compile options.

I analyzed this - these warnings only occur when I deactivate - unneeded -
DHCP-option during compiling. IDN and DNSSEC-option had no effect,
only deactivating DHCP triggers these warnings.

Log looks as follows:

***SNIP***
Feb 6 10:46:03: Building dnsmasq dnsmasq-2.76test8.tar.xz checksum OK
+ cd /usr/src/lfs
+ make -f dnsmasq LFS_BASEDIR=/usr/src install
====================================== Installing dnsmasq-2.76test8 ...
Install started; saving file list to /usr/src/lsalr ...
cd /usr/src/dnsmasq-2.76test8 && patch -Np1 -i /usr/src/src/patches/dnsmasq/001-Fix_FTBFS_on_illumos.patch
patching file src/bpf.c
cd /usr/src/dnsmasq-2.76test8 && patch -Np1 -i /usr/src/src/patches/dnsmasq/002-Make_names_of_ARP_script_actions_consistent.patch
patching file man/dnsmasq.8
patching file src/arp.c
patching file src/dnsmasq.h
patching file src/helper.c
cd /usr/src/dnsmasq-2.76test8 && patch -Np1 -i /usr/src/src/patches/dnsmasq/003-Fix_breakage_in_ARP_code_when_IPV6_support_not_compiled_in.patch
patching file src/arp.c
patching file src/helper.c
cd /usr/src/dnsmasq-2.76test8 && sed -i src/config.h \
-e 's|/\* #define HAVE_IDN \*/|#define HAVE_IDN|g' \
-e 's|/\* #define HAVE_DNSSEC \*/|#define HAVE_DNSSEC|g' \
-e 's|#define HAVE_DHCP|//#define HAVE_DHCP|g'
cd /usr/src/dnsmasq-2.76test8 && make CFLAGS="-O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -march=i586 -mtune=generic -fomit-frame-pointer" COPTS="" \
PREFIX=/usr all install
make[1]: Entering directory '/usr/src/dnsmasq-2.76test8'
make[2]: Entering directory '/usr/src/dnsmasq-2.76test8/src'
cc -O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -march=i586 -mtune=generic -fomit-frame-pointer -DVERSION='"2.76test8"' -c cache.c
cc -O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -march=i586 -mtune=generic -fomit-frame-pointer -DVERSION='"2.76test8"' -c rfc1035.c
cc -O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -march=i586 -mtune=generic -fomit-frame-pointer -DVERSION='"2.76test8"' -c util.c
cc -O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -march=i586 -mtune=generic -fomit-frame-pointer -DVERSION='"2.76test8"' -c option.c
cc -O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -march=i586 -mtune=generic -fomit-frame-pointer -DVERSION='"2.76test8"' -c forward.c
cc -O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -march=i586 -mtune=generic -fomit-frame-pointer -DVERSION='"2.76test8"' -c network.c
cc -O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -march=i586 -mtune=generic -fomit-frame-pointer -DVERSION='"2.76test8"' -c dnsmasq.c
dnsmasq.c: In function 'main':
dnsmasq.c:55:7: warning: unused variable 'did_bind' [-Wunused-variable]
int did_bind = 0;
^
dnsmasq.c:54:9: warning: unused variable 'bound_device' [-Wunused-variable]
char *bound_device = NULL;
^
cc -O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -march=i586 -mtune=generic -fomit-frame-pointer -DVERSION='"2.76test8"' -c dhcp.c
cc -O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -march=i586 -mtune=generic -fomit-frame-pointer -DVERSION='"2.76test8"' -c lease.c
cc -O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -march=i586 -mtune=generic -fomit-frame-pointer -DVERSION='"2.76test8"' -c rfc2131.c
cc -O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -march=i586 -mtune=generic -fomit-frame-pointer -DVERSION='"2.76test8"' -c netlink.c
cc -O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -march=i586 -mtune=generic -fomit-frame-pointer -DVERSION='"2.76test8"' -c dbus.c
cc -O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -march=i586 -mtune=generic -fomit-frame-pointer -DVERSION='"2.76test8"' -c bpf.c
cc -O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -march=i586 -mtune=generic -fomit-frame-pointer -DVERSION='"2.76test8"' -c helper.c
cc -O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -march=i586 -mtune=generic -fomit-frame-pointer -DVERSION='"2.76test8"' -c tftp.c
cc -O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -march=i586 -mtune=generic -fomit-frame-pointer -DVERSION='"2.76test8"' -c log.c
cc -O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -march=i586 -mtune=generic -fomit-frame-pointer -DVERSION='"2.76test8"' -c conntrack.c
cc -O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -march=i586 -mtune=generic -fomit-frame-pointer -DVERSION='"2.76test8"' -c dhcp6.c
cc -O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -march=i586 -mtune=generic -fomit-frame-pointer -DVERSION='"2.76test8"' -c rfc3315.c
cc -O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -march=i586 -mtune=generic -fomit-frame-pointer -DVERSION='"2.76test8"' -c dhcp-common.c
cc -O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -march=i586 -mtune=generic -fomit-frame-pointer -DVERSION='"2.76test8"' -c outpacket.c
cc -O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -march=i586 -mtune=generic -fomit-frame-pointer -DVERSION='"2.76test8"' -c radv.c
cc -O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -march=i586 -mtune=generic -fomit-frame-pointer -DVERSION='"2.76test8"' -c slaac.c
cc -O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -march=i586 -mtune=generic -fomit-frame-pointer -DVERSION='"2.76test8"' -c auth.c
cc -O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -march=i586 -mtune=generic -fomit-frame-pointer -DVERSION='"2.76test8"' -c ipset.c
cc -O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -march=i586 -mtune=generic -fomit-frame-pointer -DVERSION='"2.76test8"' -c domain.c
cc -O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -march=i586 -mtune=generic -fomit-frame-pointer -DVERSION='"2.76test8"' -c dnssec.c
cc -O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -march=i586 -mtune=generic -fomit-frame-pointer -DVERSION='"2.76test8"' -c blockdata.c
cc -O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -march=i586 -mtune=generic -fomit-frame-pointer -DVERSION='"2.76test8"' -c tables.c
cc -O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -march=i586 -mtune=generic -fomit-frame-pointer -DVERSION='"2.76test8"' -c loop.c
cc -O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -march=i586 -mtune=generic -fomit-frame-pointer -DVERSION='"2.76test8"' -c inotify.c
cc -O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -march=i586 -mtune=generic -fomit-frame-pointer -DVERSION='"2.76test8"' -c poll.c
cc -O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -march=i586 -mtune=generic -fomit-frame-pointer -DVERSION='"2.76test8"' -c rrfilter.c
cc -O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -march=i586 -mtune=generic -fomit-frame-pointer -DVERSION='"2.76test8"' -c edns0.c
cc -O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -march=i586 -mtune=generic -fomit-frame-pointer -DVERSION='"2.76test8"' -c arp.c
cc -o dnsmasq cache.o rfc1035.o util.o option.o forward.o network.o dnsmasq.o dhcp.o lease.o rfc2131.o netlink.o dbus.o bpf.o helper.o tftp.o log.o conntrack.o dhcp6.o rfc3315.o dhcp-common.o outpacket.o radv.o slaac.o auth.o ipset.o domain.o dnssec.o blockdata.o tables.o loop.o inotify.o poll.o rrfilter.o edns0.o arp.o -lidn -lnettle -lhogweed -lgmp
make[2]: Leaving directory '/usr/src/dnsmasq-2.76test8/src'
install -d /usr/sbin -d /usr/share/man/man8
install -m 644 man/dnsmasq.8 /usr/share/man/man8
install -m 755 src/dnsmasq /usr/sbin
make[1]: Leaving directory '/usr/src/dnsmasq-2.76test8'
Updating linker cache...
ldconfig: /usr/lib/libnetpbm.so.10 is not a symbolic link

Install done; saving file list to /usr/src/log/dnsmasq-2.76test8 ...
***SNAP***

This seems to be nothing really important(!?), but I'd like to get rid
of these warnings.

Anyone has a solution to this?

Best,
Matthias



More information about the Dnsmasq-discuss mailing list