Fix the uss_vol.c file to use the volser prototypes. This clears up the
list of the warnings in this file, so drop the warning supression from
the Makefile, and remove the entry from README.WARNINGS
Change-Id: I9e4ec8bdfa39e3a7adafea454a4c6d96c5fc9d0f
Reviewed-on: http://gerrit.openafs.org/1204
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Cleanup some prototype related warnings under bucoord and butc:
- Copy a few prototypes from bucoord_internal.h to bucoord_prototypes.h,
since they are used in other source directories
- Install bc.h under include/afs, and include it in tcmain.c
- Include bucoord_prototypes.h in tcmain.c
- Add a prototype for GetResponseKey
- Remove warning inhibition for tcmain.c, and entry in README.WARNINGS
- Remove warning inhibition for bucoord/dump.c (no entry in README)
Change-Id: I0a0ae92d3c7ba75e4a331bf59ea9c031763cc704
Reviewed-on: http://gerrit.openafs.org/1134
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Various warning fixes related mostly to the different types used
to handle keys. This should clear most of the remaining warnings
in this area. The technique of inline converter helpers is
extended to cover a few more cases.
README.WARNINGS is adjusted to reflect the current status.
Fixes:
- bos: define and use an inline converter from a ktc key to a bozo key
- bos.c and bos_utils.c should no longer have warnings - adjust Makefile
- define a ktc key to char * converter and use it in a few places
- define kas key to bozo key ptr converter and use it in a few places (afs_bosAdmin)
- cast a few arguments to ka_StringToKey which expects non-const pointers
Change-Id: I1c19869ac232d78209126d4eeeb11af8bcb95815
Reviewed-on: http://gerrit.openafs.org/860
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
When compiling src/ubik/utst_int.ss.c, a warning would be produced since
the server stubs are defined as accepting an rx_connection instead of an
rx_call, and since the server and client RPC stubs have the same name.
Give a server prefix so we can distinguish between the two, and fix the
server stubs and squash the warning, similar to
bd011aeee7.
Change-Id: Iebf843bcabb4cf8f4a56c6ac30d210573b58d801
Reviewed-on: http://gerrit.openafs.org/876
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Some (f)lex generated source files produce warnings because of unused
labels or variables.
Since there is limited control of the source itself, just be more
permissive in this particular case with -Wno-unused.
Change-Id: Ice25019f8a592a25f5084e88119b68846d900033
Reviewed-on: http://gerrit.openafs.org/867
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
A number of recent changes haven't caught all of the locations where
warning inhibition can be removed. This patch updates all of the
inhibitions to reflect the current state of the tree when built with
gcc4.2
Change-Id: I7bad4fee1258f4e37fd729cda84711fed66acbc9
Reviewed-on: http://gerrit.openafs.org/813
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Prototype the kalog_Init function in kauth_internal.h, and remove
the warning inhibition from kaserver.c
Change-Id: Ic48d199126629f1c0c2e498081be97901678ec70
Reviewed-on: http://gerrit.openafs.org/812
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
ubik_ServerInit* take a pathname, which should really be a const.
It already is in many of the callers, some of which remove the
const by casting, the others throw errors.
Make pathName const for all of ubik_ServerInitByInfo, ubik_ServerInit
and ubik_ServerInitCommon.
Update all of our callers to remove the now unecessary casting.
Remove the now uneccessary warning inhibition on vlserver/vlserver.c
Change-Id: I009103dc49e4473eec65ebd75aab727915c26f3c
Reviewed-on: http://gerrit.openafs.org/811
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The call to afsconf_AddKey was using 'akey' rather than 'akey->data'.
As data is the first element of the akey structure, these are actually
identical, but the compiler sees it as a type error. Fix to use the
correct name, and remove the warning inhibition.
Change-Id: Id4775a836276ddd6f5ae105c298dcc3c68b92145
Reviewed-on: http://gerrit.openafs.org/810
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Publicly prototype UV_Bind in volser_prototypes.h
Make dump.c use the public prototype, instead of an incomplete
private copy, and remove the warning inhibition that was required to
support the private copy.
Change-Id: I945192454702d79083a10062adaf2cb124d14a35
Reviewed-on: http://gerrit.openafs.org/809
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
This file generates a warning because the left side of a variable
assignment is commented out. Keep the effect of the line
(incrementing packet) but remove the unused casting and
reference, and remove the comments that date from the original
IBM source.
Leave a new comment in place in case the information is useful.
Adjust the Makefile and README.WARNINGS to account for the change.
Change-Id: I944e1c488e39411d32d700cba2d3ef567eddddb4
Reviewed-on: http://gerrit.openafs.org/804
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
When compiling src/bubasics/bumon.ss.c a warning would be produced
due to an rx_call* being passed into BC_Print which in its client
form requires an rx_connection*. The server implementation and client
stub each were called BC_Print because there was no server prefix
specified in bumon.xg. Add prefix 'S' and update bucoord/server.c
to match.
Reviewed-on: http://gerrit.openafs.org/686
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Resolve more minor warnings from the kauth directory.
*) kaux_read takes an unsigned for the number of failures
*) The COUNT_REQ macro generates an unused variable (this_op)
*) kas is missing some headers
*) Add some more prototypes to kauth_internal.h
*) Add the standard boilerplate to kauth_internal.h
*) recvfrom takes a socklen_t * as its 6th argument
This make kaprocs.c, kaauxdb.c, kas.c, klog.c, and ka-forwarder.c
warning clean. Mark them as such.
Reviewed-on: http://gerrit.openafs.org/673
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
This change tidies up after the recent slew of warning reduction. It
updates README.WARNINGS to reflect the current state of the tree,
disables warnings for a couple of files that are now warning clean,
and ensures that the libuafs and libafsrpc Makefiles match the state
of the rest of the tree in terms of which warnings are enabled.
Reviewed-on: http://gerrit.openafs.org/672
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Prevent rxgen from generating code that produces warnings at compile
time.
* Add print_ifarg_with_cast(). Used within print_ifstat() to generate
a member in an argument list complete with a type cast. The type
cast may be a pointer to the type or the type depending on the value
of the 'ptr_to' parameter.
* When print_ifstat() generates the output for an opaque vector, cast
the object to 'caddr_t' as xdr_opaque() accepts an argument of type
'caddr_t'.
* When print_ifstat() generates the output for an opaque array, cast
the object to 'char **' because xdr_bytes() accepts an argument of
type 'char **'.
* When print_ifstat() generates the output for any array that is not
opaque or string, cast the object to 'caddr_t' because all of the
xdr_XXX() functions other than xdr_opaque and xdr_bytes accept an
argument of type 'caddr_t'.
* When print_ifstat() generates the output for an alias, cast the
output to a pointer to the specified type because xdr_<type> accepts
an argument of type '<type> *'.
This addresses warnings generated when compiling fsint/Kvice.xdr.c and
fsint/afsint.xdr.c.
Reviewed-on: http://gerrit.openafs.org/664
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Recent change sets removed the 'ignore-all-warnings' mode from a
number of files, in favour of using the implicit-function-declaration
pragma. Sadly, that pragma isn't available in gcc 4.2. Revert the
Makefile changes such that ignore all warnings is turned back on
for the affected files, and note this in README.WARNINGS
Reviewed-on: http://gerrit.openafs.org/639
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Add a new public header file volser_prototypes.h, which contains
prototypes for those volser functions that are used by the rest of the
tree, and link it into the Unix and Windows build systems.
Rename the current volser_prototypes.h volser_internal.h, and update
references to it.
Make those places that should use the new public header use it, and
re-enable warnings-as-errors as appropriate.
Remove the warning free files from the list in README.WARNINGS
Add butm_prototypes.h to butc/lwps.c, so we can enable warnings for that,
too.
Reviewed-on: http://gerrit.openafs.org/636
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
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>
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>
-- 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>
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>