Roland C. Dowdeswell
cc47c8fa7b
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.
2012-02-20 19:45:41 +00:00
Love Hornquist Astrand
0879b9831a
remove trailing whitespace
2011-05-21 11:57:31 -07:00
Jeffrey Altman
6850d6a65f
avoid uninit variable and unreachable code warnings
...
most of these warnings are not problems because of ample
use of abort() calls. However, the large number of warnings
makes it difficult to identify real problems. Initialize
the variables to shut up the compilers.
Change-Id: I8477c11b17c7b6a7d9074c721fdd2d7303b186a8
2011-05-17 12:02:16 -04:00
Love Hornquist Astrand
f5f9014c90
Warning fixes from Christos Zoulas
...
- shadowed variables
- signed/unsigned confusion
- const lossage
- incomplete structure initializations
- unused code
2011-04-29 20:25:05 -07:00
Love Hornquist Astrand
f632c5239e
one element per line
2011-04-14 12:54:16 -07:00
Love Hornquist Astrand
f1718af272
make work again after adding loopback addresses
2011-04-07 07:15:27 -07:00
Nicolas Williams
e7672a71aa
Patch to include non-loopback addresses from loopback interfaces.
...
Signed-off-by: Love Hornquist Astrand <lha@h5l.org >
2011-04-04 22:45:33 -07:00
Love Hornquist Astrand
687db64c56
Patch from Secure Endpoints/Asanka Herath for windows support
2009-12-21 08:45:28 +01:00
Love Hörnquist Åstrand
942a821fab
remove RCSID
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25171 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-05-04 06:17:40 +00:00
Love Hörnquist Åstrand
269ddbd09e
dont increment p since its no longer used
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24853 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-02-27 03:30:09 +00:00
Love Hörnquist Åstrand
a45c993c88
make sure all addresses are added
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24158 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-12-11 05:09:38 +00:00
Love Hörnquist Åstrand
ecdf7c3d88
plug memory leak when we find a dup adress
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24153 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-12-11 05:08:47 +00:00
Love Hörnquist Åstrand
f9120fced8
check return value, cid#62
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24143 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-12-11 05:07:04 +00:00
Love Hörnquist Åstrand
fc1e83044e
RANGE: is not small
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23988 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-10-26 18:26:28 +00:00
Love Hörnquist Åstrand
6937d41a02
remove trailing whitespace
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23815 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-13 09:21:03 +00:00
Love Hörnquist Åstrand
e172367898
switch to utf8 encoding of all files
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23814 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-13 08:53:55 +00:00
Love Hörnquist Åstrand
4f023f744b
provide i18n hooks and renew krb5_create_checksum_iov from comments from metze
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23733 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-07 21:06:34 +00:00
Love Hörnquist Åstrand
7fcd266fdd
use krb5_set_error_message
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23316 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-06-23 04:32:32 +00:00
Love Hörnquist Åstrand
854ef9a202
switch to krb5_set_error_message
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23273 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-06-23 03:25:00 +00:00
Love Hörnquist Åstrand
f505cc2b8a
update (c)
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22039 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-11-10 11:47:35 +00:00
Love Hörnquist Åstrand
04e78ccc37
doxygen documentation
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22038 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-11-10 10:50:38 +00:00
Love Hörnquist Åstrand
4505c1fee6
(arange_free): Try to not leak memory.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18805 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-22 06:54:00 +00:00
Love Hörnquist Åstrand
348b5d79c4
Rename u_intXX_t to uintXX_t
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17442 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-05-05 09:31:15 +00:00
Love Hörnquist Åstrand
03f05a7a6e
(krb5_make_addrport): clear return value on error, found by IBM checker.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16955 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-04-02 02:17:31 +00:00
Love Hörnquist Åstrand
08687cb067
(krb5_free_addresses): reset val,len in address when free-ing.
...
Fixes Coverity NetBSD bug #2605
(krb5_parse_address): reset val,len before possibly return errors
Fixes Coverity NetBSD bug #2605
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16793 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-03-17 22:12:13 +00:00
Love Hörnquist Åstrand
31a2c01297
use rk_UNCONST to silence const warning
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15444 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-06-16 20:16:12 +00:00
Love Hörnquist Åstrand
38f3241d93
rename sin to sin4
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15443 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-06-16 20:10:34 +00:00
Love Hörnquist Åstrand
e84fad2e0e
zero out content of all krb5_free_x_content like functions to make sure data doesnt get reused, idea from Wynn Wilkes <wwilkes@vintela.com>
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15167 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-05-18 04:21:57 +00:00
Love Hörnquist Åstrand
db171a26fd
(krb5_print_address): catch when the custom print v6-adresss don't fit
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15098 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-05-07 07:50:24 +00:00
Love Hörnquist Åstrand
e869931f80
catch two more snprintf problems
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14877 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-04-21 06:37:36 +00:00
Love Hörnquist Åstrand
a76ce26d04
check return values from snprintf and clean up semantics of ret_len
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14853 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-04-19 18:43:12 +00:00
Love Hörnquist Åstrand
8663e85292
(krb5_address_prefixlen_boundary,krb5_free_address): use find_atype
...
when we are dealing with a kerberos address type
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14726 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-04-04 12:04:41 +00:00
Love Hörnquist Åstrand
1fffb1a13a
implement mask boundary for IPv6
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14703 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-03-31 00:11:14 +00:00
Love Hörnquist Åstrand
90fff550fa
make RANGE parse prefixlen style addresses too, fix printing of RANGE
...
addresses, add krb5_address_prefixlen_boundary
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14690 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-03-28 19:16:43 +00:00
Love Hörnquist Åstrand
69a18af8ac
(krb5_parse_address): filter out dup addresses from getaddrinfo
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14479 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-01-05 17:36:11 +00:00
Love Hörnquist Åstrand
91351971f7
add KRB5_LIB_FUNCTION to all exported functions
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13863 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-05-25 21:46:46 +00:00
Johan Danielsson
006f2206ef
(krb5_print_address): make sure print_addr is defined for the given
...
address type; make addrports printable
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11911 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-03-25 12:37:02 +00:00
Johan Danielsson
d69ee8c06b
socklen_t -> krb5_socklen_t
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11128 ec53bebd-3082-4978-b11e-865c3cabbd6b
2002-08-19 13:51:37 +00:00
Johan Danielsson
04e8a9438f
check return value of krb5_sockaddr2address
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11102 ec53bebd-3082-4978-b11e-865c3cabbd6b
2002-08-15 08:23:07 +00:00
Johan Danielsson
5313dd39c6
(krb5_print_address): don't copy size if ret_len == NULL
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11052 ec53bebd-3082-4978-b11e-865c3cabbd6b
2002-07-04 14:29:05 +00:00
Johan Danielsson
2230d20dc3
(ipv4_sockaddr2port): constify
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10908 ec53bebd-3082-4978-b11e-865c3cabbd6b
2002-04-18 08:55:40 +00:00
Assar Westerlund
f0c910460c
make all functions taking 'struct sockaddr' actually take a socklen_t
...
instead of int and that acts as an in-out parameter (indicating the
maximum length of the sockaddr to be written)
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10866 ec53bebd-3082-4978-b11e-865c3cabbd6b
2002-03-10 23:09:37 +00:00
Assar Westerlund
32e654f748
(krb5_print_address): handle snprintf returning < 0
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10650 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-09-03 19:53:51 +00:00
Assar Westerlund
f879fea593
(krb5_print_address): fix typo found by hin@stacken.kth.se
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10649 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-09-03 19:45:53 +00:00
Johan Danielsson
4a118deffb
(krb5_sockaddr_uninteresting): don't try to call uninteresting
...
function if not defined by address family
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10487 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-08-13 13:23:53 +00:00
Johan Danielsson
68b76a3aee
add support for type KRB5_ADDRESS_ADDRPORT
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10393 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-07-24 12:07:20 +00:00
Johan Danielsson
3f57fc8ae8
(krb5_address_order): complain about unsuppored address types
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10391 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-07-24 11:34:37 +00:00
Johan Danielsson
abc905d3c9
add new `arange' fake address type, that matches more than one
...
address; this required some internal changes to many functions, so all
of address.c got moved here (wasn't much left there)
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10237 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-07-02 22:26:42 +00:00
Assar Westerlund
1f31dd74e9
update to new krb5_eai_to_heim_errno
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9951 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-05-14 22:49:56 +00:00
Assar Westerlund
d27aa3b62e
add some krb5_{set,clear}_error_string
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9937 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-05-14 06:14:52 +00:00