Commit Graph

54 Commits

Author SHA1 Message Date
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
351e0d0914 catch error from as.*printf 2010-05-30 13:28:09 -07:00
Love Hornquist Astrand
b939943b07 first stange of asn1 table driven compiler 2009-11-21 10:24:56 -08: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
3ee710d8e0 Test boolean.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21359 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-27 08:15:41 +00:00
Love Hörnquist Åstrand
22b2fb06cb test universal strings.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21357 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-27 08:08:15 +00:00
Love Hörnquist Åstrand
1ce6ffe667 Test failure cases for der_get_tag.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21356 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-27 08:05:08 +00:00
Love Hörnquist Åstrand
3a57d2d338 test dates from last century.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21355 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-27 07:43:18 +00:00
Love Hörnquist Åstrand
d9e1a55133 Move zero length integercheck to a better place.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21354 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-27 07:37:01 +00:00
Love Hörnquist Åstrand
9dadfd765e Test zero length integer.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21352 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-27 07:33:42 +00:00
Love Hörnquist Åstrand
d7cd92f569 Init data to something.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21120 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-18 19:48:02 +00:00
Love Hörnquist Åstrand
34570645e8 More cmp checks.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21022 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-08 17:02:42 +00:00
Love Hörnquist Åstrand
1e2d2a0434 Free more memory.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20863 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-03 20:27:34 +00:00
Love Hörnquist Åstrand
523e07f8e5 Also free right memory.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20859 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-03 20:05:15 +00:00
Love Hörnquist Åstrand
f03f7ec26d more check for der_parse_hex_heim_integer
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20841 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-03 14:14:55 +00:00
Love Hörnquist Åstrand
393f0ed433 (test_heim_oid_format_same): avoid leaking memory in the non failure case too
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20418 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-04-19 07:06:55 +00:00
Love Hörnquist Åstrand
8a4de2f00a test more combinations of NUL
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20371 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-04-17 17:47:01 +00:00
Love Hörnquist Åstrand
e652d77112 More tests for trailing NULs.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20370 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-04-17 17:41:28 +00:00
Love Hörnquist Åstrand
f8cbee6da9 Drop one over INT_MAX test-case.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20204 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-02-08 01:09:30 +00:00
Love Hörnquist Åstrand
bbe3d9bbf8 check BMPstring oddlength more
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20016 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-01-20 22:21:40 +00:00
Love Hörnquist Åstrand
959c8423df Test for NUL char in string in GENERAL STRING.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20012 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-01-20 21:54:23 +00:00
Love Hörnquist Åstrand
265ce7ee85 Make sure expression have constant value, for picky compilers.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19756 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-01-08 06:31:24 +00:00
Love Hörnquist Åstrand
6f6a02b312 avoid leaking memory
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18769 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-21 18:27:59 +00:00
Love Hörnquist Åstrand
2f48a4f301 Prefix primitive types with der_.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18463 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-14 13:02:55 +00:00
Love Hörnquist Åstrand
da6e710e29 New der_put_heim_integer signature.
Test der_parse_heim_oid


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18431 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-14 04:55:37 +00:00
Love Hörnquist Åstrand
eb71698416 (check_fail_heim_integer): disable test
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17686 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-06-22 07:20:09 +00:00
Love Hörnquist Åstrand
8586a88524 (test_heim_oid_format_same): add printing on failure
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17676 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-06-22 03:48:45 +00:00
Love Hörnquist Åstrand
64537b853a Add one check for heim_int, add checking for oid printing
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17675 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-06-22 03:43:04 +00:00
Love Hörnquist Åstrand
483d00b945 check heim_integer.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16634 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-01-20 10:00:14 +00:00
Love Hörnquist Åstrand
905a9d79b8 check that der_parse_hex_heim_integer() handles odd length numbers.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16572 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-01-16 23:02:16 +00:00
Love Hörnquist Åstrand
7f2116e65f Add tests for parse and print functions for heim_integer.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16128 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-10-07 03:49:57 +00:00
Love Hörnquist Åstrand
0bb2f95b62 Avoid empty array initiators.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16064 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-09-13 21:08:03 +00:00
Love Hörnquist Åstrand
b9a6e93c62 Don't depend on malloc(very-very-larger-value) will fail.
Cast to unsigned long before printing size_t.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16057 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-09-13 19:36:17 +00:00
Love Hörnquist Åstrand
fc894dcecf Removed wrong variable.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16053 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-09-09 12:04:38 +00:00
Love Hörnquist Åstrand
dea6f6cdf8 (test_one_int): len and len_len is size_t
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16047 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-09-09 04:57:08 +00:00
Love Hörnquist Åstrand
56686ca406 Make variable initiation constant by moving them to global context
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15772 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-07-27 11:54:36 +00:00
Love Hörnquist Åstrand
876760dd16 make it work for non c99 compilers too
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15757 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-07-25 23:36:00 +00:00
Love Hörnquist Åstrand
153f392b66 start testing BIT STRING
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15756 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-07-25 23:35:22 +00:00
Love Hörnquist Åstrand
5940c92087 (check_fail_bitstring): check for length overflow
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15664 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-07-19 15:09:18 +00:00
Love Hörnquist Åstrand
b838707d0e Commit much improved ASN.1 compiler from joda-choice-branch.
Highlighs for the compiler is support for CHOICE and in general better
support for tags. This compiler support most of what is needed for
PK-INIT, LDAP, X.509, PKCS-12 and many other protocols.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15617 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-07-12 06:27:42 +00:00
Love Hörnquist Åstrand
9dfec2715f use size_t, print size_t by casting to unsigned long
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14742 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-04-04 19:36:37 +00:00
Love Hörnquist Åstrand
387710cab1 test for "der_length.c: Fix len_unsigned for certain negative
integers, it got the length wrong" , from Panasas, Inc.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13317 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-02-07 14:30:07 +00:00
Love Hörnquist Åstrand
939b444ca3 prefix typedef\'s and structs with heim_
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12438 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-07-15 13:57:32 +00:00
Johan Danielsson
5ce268bf83 Fix encoding of "unsigned" integers. If MSB is set, we need to pad
with a zero byte.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12337 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-05-27 21:59:52 +00:00
Love Hörnquist Åstrand
094ad23abc move out the generic asn1/der functions to a common file
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11599 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-01-23 10:19:49 +00:00
Assar Westerlund
d58e378f3a make this build again
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11213 ec53bebd-3082-4978-b11e-865c3cabbd6b
2002-08-23 03:17:34 +00:00
Johan Danielsson
c5b916ca6f remove advertising clause
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7464 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-12-02 17:05:13 +00:00
Assar Westerlund
7f6621b7f3 add test cases for Generalized time and make sure we return the
correct value


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7055 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-09-28 03:08:53 +00:00
Assar Westerlund
c57514b379 more test cases for integers
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6469 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-07-15 17:16:37 +00:00