Commit Graph

4 Commits

Author SHA1 Message Date
Andrew Deason
8314001bdb Reduce warnings in vos.c
Squash a few miscellaneous that appear when building vos.c:

 -- CreateVolume should use util_GetUInt32 to parse vol ids, since they
    are now unsigned

 -- The m_uuid argument of print_addrs is altered, so do not declare it
    const

 -- Declare the confDir argument of ugen/vsu_ClientInit to be const,
    since it does not change, and vos.c passes a const confDir in
    MyBeforeProc

 -- Ignore implicit function declaration warnings and remove
    CFLAGS_NOERROR from the vos.c build, since the only remaining
    warning is an implicit function declaration

Reviewed-on: http://gerrit.openafs.org/602
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-10-08 08:01:05 -07:00
Andrew Deason
c8482d0fb9 Fix warnings in rxkad
Some miscellaneous warnings throughout rxkad:

rxkad/ticket5.c:
 - Explicitly cast ticket blob to unsigned char*, as some functions take
   a ticket as a char*, and some take it as an unsigned char*

 - in tkt_DecodeTicket5, make 'start' and 'end' be unsigned, since that
   is what their callers think they are

 - Ignore implicit function declaration warnings (for CRC functons)

 - Remove general warning inhibition

rxkad/ticket.c:
 - in tkt_DecodeTicket, make 'start' and 'end' be unsigned, since that
   is what their callers think they are

 - Remove general warning inhibition

rxkad/v5der.c:
 - In decode_enumerated, use der_get_unsigned instead of der_get_int,
   since we're decoding an unsigned integer.

rxkad/rxkad_server.c:
 - The last two arguments to rxkad_DeriveXORInfo are char*s, so
   explicitly cast them to be so

 - Remove general warning inhibition

rxkad/rxkad_common.c:
 - rxkad_stats_t has had a couple of spares transform into
   clientObjects/serverObjects; account for them and don't overrun the
   spares array

Reviewed-on: http://gerrit.openafs.org/600
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-10-08 08:00:13 -07:00
Andrew Deason
36be36e034 Fix warnings in kauth/authclient.c
-- In ka_Authenticate, explicitly cast 'start' and 'end' to void*,
    since kawrap_ubik_Call takes all arguments as void*s

 -- Fix kawrap_ubik_Call to not be an old-style declaration

 -- Only ignore strict prototypes and implicit function declaration
    warnings

Reviewed-on: http://gerrit.openafs.org/597
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-10-08 03:42:19 -07:00
Simon Wilkinson
6d51ebd6c8 Add support for warning checked builds
This patch adds a '--enable-checking' configuration option. When this
option is supplied, and gcc is in use, the compiler will treat any
warnings as errors. This will hopefully help stop new warnings from
creeping into the tree.

In order to still be able to build, all of the currently existing
warnings are accepted (these are documented in README.WARNINGS). With
this set of warning inhibitions, the tree is known to build on 32bit
Leopard - other systems may vary. Warning inhibition may be disabled
by supplying --enable-checking=all - in this case the tree will
definitely not build!

If --enabled-checking is not specified, the existing compilation
behaviour is maintained, so there is no user-visible change.

Gcc 4.2, or later, is required to use the pragma sets contained within
this patch. Again, they are not visible unless --enable-checking is
given.

Reviewed-on: http://gerrit.openafs.org/526
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-09-28 05:00:04 -07:00