Turn on -Wextra -Wno-sign-compare -Wno-unused-paramter and fix issues.
commitcc47c8fa7b0f4567bb9dd7e692c32a558a166d5c
authorRoland C. Dowdeswell <elric@imrryr.org>
Mon, 20 Feb 2012 19:45:41 +0000 (20 19:45 +0000)
committerRoland C. Dowdeswell <elric@imrryr.org>
Mon, 20 Feb 2012 19:45:41 +0000 (20 19:45 +0000)
tree337519241f3ee82f8c7c7b29f0f7c4ff66b19423
parent8ce8cb509a8a2772cd82e6f41c7fda4c6ee3e562
Turn on -Wextra -Wno-sign-compare -Wno-unused-paramter and fix issues.

We turn on a few extra warnings and fix the fallout that occurs
when building with --enable-developer.  Note that we get different
warnings on different machines and so this will be a work in
progress.  So far, we have built on NetBSD/amd64 5.99.64 (which
uses gcc 4.5.3) and Ubuntu 10.04.3 LTS (which uses gcc 4.4.3).

Notably, we fixed

1.  a lot of missing structure initialisers,

2.  unchecked return values for functions that glibc
    marks as __attribute__((warn-unused-result)),

3.  made minor modifications to slc and asn1_compile
    which can generate code which generates warnings,
    and

4.  a few stragglers here and there.

We turned off the extended warnings for many programs in appl/ as
they are nearing the end of their useful lifetime, e.g.  rsh, rcp,
popper, ftp and telnet.

Interestingly, glibc's strncmp() macro needed to be worked around
whereas the function calls did not.

We have not yet tried this on 32 bit platforms, so there will be
a few more warnings when we do.
147 files changed:
appl/afsutil/afslog.c
appl/afsutil/pagsh.c
appl/ftp/ftp/Makefile.am
appl/ftp/ftp/cmds.c
appl/ftp/ftp/cmdtab.c
appl/ftp/ftpd/ftpd.c
appl/ftp/ftpd/logwtmp.c
appl/gssmask/gssmaestro.c
appl/gssmask/gssmask.c
appl/kf/kf.c
appl/kf/kfd.c
appl/kx/krb5.c
appl/kx/kx.c
appl/kx/kxd.c
appl/login/env.c
appl/login/limits_conf.c
appl/login/login.c
appl/otp/otp.c
appl/otp/otpprint.c
appl/popper/Makefile.am
appl/push/push.c
appl/rcp/Makefile.am
appl/rcp/rcp.c
appl/rsh/Makefile.am
appl/su/su.c
appl/telnet/libtelnet/Makefile.am
appl/telnet/libtelnet/auth.c
appl/telnet/libtelnet/encrypt.c
appl/telnet/telnet/Makefile.am
appl/telnet/telnetd/Makefile.am
appl/telnet/telnetd/utility.c
appl/test/Makefile.am
appl/test/common.c
appl/test/http_client.c
appl/test/nt_gss_server.c
base/bsearch.c
base/test_base.c
cf/roken-frag.m4
cf/wflags.m4
kadmin/add-random-users.c
kadmin/ank.c
kadmin/cpw.c
kadmin/get.c
kadmin/kadmin.c
kadmin/kadmind.c
kadmin/stash.c
kcm/cache.c
kcm/config.c
kcm/glue.c
kcm/main.c
kcm/protocol.c
kdc/config.c
kdc/digest.c
kdc/hpropd.c
kdc/kdc-replay.c
kdc/kstash.c
kdc/pkinit.c
kpasswd/kpasswd-generator.c
kpasswd/kpasswd.c
kpasswd/kpasswdd.c
kuser/generate-requests.c
kuser/kdecode_ticket.c
kuser/kinit.c
kuser/kswitch.c
kuser/kverify.c
lib/asn1/asn1_gen.c
lib/asn1/asn1_print.c
lib/asn1/check-common.c
lib/asn1/check-der.c
lib/asn1/check-gen.c
lib/asn1/gen_decode.c
lib/asn1/gen_encode.c
lib/asn1/main.c
lib/com_err/compile_et.c
lib/gssapi/krb5/external.c
lib/gssapi/mech/gss_oid.c
lib/gssapi/ntlm/external.c
lib/gssapi/ntlm/init_sec_context.c
lib/gssapi/spnego/external.c
lib/hdb/db3.c
lib/hdb/dbinfo.c
lib/hdb/keytab.c
lib/hdb/test_dbinfo.c
lib/hdb/test_hdbkeys.c
lib/hdb/test_mkey.c
lib/hx509/ca.c
lib/hx509/cert.c
lib/hx509/cms.c
lib/hx509/error.c
lib/hx509/hxtool.c
lib/hx509/keyset.c
lib/hx509/ks_dir.c
lib/hx509/ks_null.c
lib/hx509/ks_p11.c
lib/hx509/ks_p12.c
lib/hx509/lock.c
lib/hx509/softp11.c
lib/ipc/client.c
lib/ipc/tc.c
lib/ipc/ts-http.c
lib/ipc/ts.c
lib/kadm5/ad.c
lib/kadm5/context_s.c
lib/kadm5/get_princs_s.c
lib/kadm5/init_c.c
lib/kadm5/iprop-log.c
lib/kadm5/ipropd_master.c
lib/kadm5/ipropd_slave.c
lib/kadm5/log.c
lib/kadm5/test_pw_quality.c
lib/kafs/common.c
lib/krb5/addr_families.c
lib/krb5/config_file.c
lib/krb5/crypto-null.c
lib/krb5/derived-key-test.c
lib/krb5/init_creds_pw.c
lib/krb5/kcm.c
lib/krb5/keytab_any.c
lib/krb5/keytab_file.c
lib/krb5/keytab_keyfile.c
lib/krb5/keytab_memory.c
lib/krb5/n-fold-test.c
lib/krb5/pkinit.c
lib/krb5/replay.c
lib/krb5/salt-aes.c
lib/krb5/salt-arcfour.c
lib/krb5/salt-des.c
lib/krb5/salt-des3.c
lib/krb5/scache.c
lib/krb5/string-to-key-test.c
lib/krb5/test_cc.c
lib/krb5/verify_krb5_conf.c
lib/otp/otptest.c
lib/roken/base64-test.c
lib/roken/hex-test.c
lib/roken/rkpty.c
lib/roken/roken_gethostby.c
lib/roken/simple_exec.c
lib/roken/test-mem.c
lib/sl/slc-gram.y
lib/wind/bidi.c
lib/wind/combining.c
lib/wind/errorlist.c
lib/wind/map.c
lib/wind/normalize.c
lib/wind/test-normalize.c
lib/wind/test-utf8.c