readme: move README.WARNINGS to CODING Move the information about compiler warnings to the CODING readme file. Change-Id: I0be752c76ddee809fe80bd1f97048953eeee89ee Reviewed-on: http://gerrit.openafs.org/10975 Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: D Brashear <shadow@your-file-system.com>
Fix warnings-as-errors for clang It seems like some versions of clang have a problem with using pragmas to stop particular warnings being converted to errors with -Werror. These compilers require that the warning be ignored completely in order to suppress it. Make the necessary changes to afsd and bozo, and update README.WARNINGS to note the problem. Change-Id: I66038130695d2ad27c289f29bcd8f6f2eddf1ded Reviewed-on: http://gerrit.openafs.org/9135 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil> Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
hcrypto: Suppress empty body warning clang now complains about statements of the form if (blah) ; There's one of these in hcrypto. Until we can get this fixed upstream, just mark the file as no-error. Change-Id: I86d1362552ca9ee7b2c47a7c92bd8d6484ab7dbd Reviewed-on: http://gerrit.openafs.org/9134 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
correct whitespace errors in readme files Fix the trailing whitespace and leading spaces before tabs in the readme files. Change-Id: If20e528ddb28f82e4d3d1b1f03dec8670f914afc Reviewed-on: http://gerrit.openafs.org/8877 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Michael Meffie <mmeffie@sinenomine.net> Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com> Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
afsd: Tidy up system calls Tidy up the way that we do system calls from afsd, by making afsd_syscall a va_arg function, using a structure to pass system call information around, and simplifying the #ifdef ladder that converts our platform independent system calls into something platform specific. This fixes all of the warnings in afsd which required the -Wno-error option, the only warnings remaining are related to daemon being deprecated on Darwin. Change-Id: I357c7d175b5327007d50d213c6181881c842050e Reviewed-on: http://gerrit.openafs.org/7188 Tested-by: BuildBot <buildbot@rampaginggeek.com> Tested-by: Derrick Brashear <shadow@dementix.org> Reviewed-by: Derrick Brashear <shadow@dementix.org>
rx/rxkad: Move rxkad initialisation into rxkad When the RX pthread conversion was done, the initialisation of rxkad mutexes was incorporated into the rx library itself. This is a layering violation (it breaks the relatively clean security object abstraction), and means that you can't actually use RX without the rxkad library. So, remove all of this initialisation from RX. As security libraries don't have an explicit initialisation function, we setup our various mutexes using a pthread_once function called from the NewSecurityObject functions. This has the added bonus that it removes the final error in rx.c for pthread builds, and so another bit of warning suppression can be removed. Change-Id: I3cf9b2404a03fb58534c5f41afd77aa5ba5e2256 Reviewed-on: http://gerrit.openafs.org/5361 Reviewed-by: Derrick Brashear <shadow@dementix.org> Tested-by: Jeffrey Altman <jaltman@openafs.org> Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
rxkad: Suppress warnings for ticket5.c rxkad's ticket5.c includes v5gen.c, a generated file from Heimdal. This file contains a load of set-but-unused variable warnings. As we currently have no way of portably suppressing just these warnings, turn off warnings-as-errors for ticket5.c Change-Id: I739cee4f345523fce130c73c713c7309273f5bee Reviewed-on: http://gerrit.openafs.org/5003 Tested-by: Derrick Brashear <shadow@dementia.org> Reviewed-by: Derrick Brashear <shadow@dementia.org>
Update README.WARNINGS, adjust warning inhibition flags Remove warning inhibition for fsprobe and uss_kauth, and adjust README.WARNINGS to the current status. Change-Id: Icc1f16a6ec70799c05abfcde557c66fae7c4311d Reviewed-on: http://gerrit.openafs.org/4400 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementia.org>
Make ubik use unsigned addresses The ubik code currently treats IPv4 addresses as both signed and unsigned 32-bit ints. Make some instances use unsigned ints to make ubik more consistent and squash a couple of warnings. Note that this slightly alters the signatures of the public ubik functions ubeacon_InitServerListByInfo, ubeacon_InitServerList, ubik_ServerInitByInfo, ubik_ServerInit, ubik_ParseClientList, and ubik_ParseServerList, to use unsigned addresses. Change-Id: I27b6170d4de0080bf66d51a6b5332e65685ddef8 Reviewed-on: http://gerrit.openafs.org/875 Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
Clean up warnings in libadmin/bos/afs_bosAdmin.c Use the correct data structures for BOS timestamps. Use afs_int32 for the expressed timestamps for executables since that's what the BOS RPC says it's using for right now; we should change this, but when we do, warnings will catch this use along with the others. Cast some const char *'s that are passed into BOS functions that take char *'s. Change-Id: Iff3a6c42241953ed086f8e739cdb344a41a44635 Reviewed-on: http://gerrit.openafs.org/2050 Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com> Tested-by: Marc Dionne <marc.c.dionne@gmail.com> Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
More warnings cleanup Remove uneccessary warning inhibition in vol/ Update README.WARNINGS to match the current state of the tree Change-Id: Ic1e5c74e0e7c2ccce0519b1572034f3666aa75e9 Reviewed-on: http://gerrit.openafs.org/1392 Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com> Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
Split afsd into afsd.c and afsd_kernel.c Move the parts of afsd.c that depend on using the kernel module into afsd_kernel.c. Keep in afsd.c code that can be used with libuafs drivers. Change-Id: I22c4dd698e8c12c42dabd85ea38226ffd8746d11 Reviewed-on: http://gerrit.openafs.org/1723 Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
XDR: Stop the madness We currently attempt to align our XDR implementation with what may be provided by the host system. This leads to a huge amount of parameter fudging, and general pain and misfortune. However, the only place that we still actually use the system XDR is for UKERNEL builds. Change this so that we use our XDR everywhere. Fix all of our type and function definitions so that they're standard. Remove the warning inhibitions. Change-Id: I53f4539e50eacb4e0691d8d3d6546bbfb7438358 Reviewed-on: http://gerrit.openafs.org/1340 Reviewed-by: Chaz Chandler Tested-by: Chaz Chandler Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org> Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
xdrmem for ukernel fix up the build for ukernel when warnings are enabled Change-Id: I2520f77e043f2e75297ef66a4c44b6e456d30892 Reviewed-on: http://gerrit.openafs.org/1329 Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
Fix USS to use volser prototypes 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>
Warning cleanup: implicit function declarations in butc and bucoord 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>
Warning fixes - key handling 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>
Add server prefix to utst_int.xg 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 bd011aeee7f5dad5c61fd81a90b296c46a0b9058. Change-Id: Iebf843bcabb4cf8f4a56c6ac30d210573b58d801 Reviewed-on: http://gerrit.openafs.org/876 Tested-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Derrick Brashear <shadow@dementia.org>
Remove "unused" warnings from lex generated files 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>
Update warning inhibition 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>