diff options
author | Derrell Lipman <derrell@samba.org> | 2005-03-30 04:40:24 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:56:24 -0500 |
commit | 5b19ede88ed80318e392f8017f4573fbb2ecbe0f (patch) | |
tree | cef2400387129db212b0007bb30c797a4123a40f /source/tdb | |
parent | e1df648ea13651e1df3d209937034b351a7f1c2b (diff) | |
download | samba-5b19ede88ed80318e392f8017f4573fbb2ecbe0f.tar.gz samba-5b19ede88ed80318e392f8017f4573fbb2ecbe0f.tar.xz samba-5b19ede88ed80318e392f8017f4573fbb2ecbe0f.zip |
r6127: Eliminated all compiler warnings pertaining to mismatched "qualifiers". The
whole of samba comiles warning-free with the default compiler flags.
Temporarily defined -Wall to locate other potential problems. Found an
unused static function (#ifdefed out rather than deleted, in case it's
needed for something in progress).
There are also a number of uses of undeclared functions, mostly krb5_*.
Files with these problems need to have appropriate header files included,
but they are not fixed in this update.
oplock_linux.c.c has undefined functions capget() and capset(), which need
to have "#undef _POSIX_SOURCE" specified before including <sys/capability.h>,
but that could potentially have other side effects, so that remains uncorrected
as well.
The flag -Wall should be added permanently to CFLAGS, and all warnings then
generated should be eliminated.
Diffstat (limited to 'source/tdb')
-rw-r--r-- | source/tdb/tdb.c | 2 | ||||
-rw-r--r-- | source/tdb/tdbutil.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/source/tdb/tdb.c b/source/tdb/tdb.c index b3d596f4428..0644b64da09 100644 --- a/source/tdb/tdb.c +++ b/source/tdb/tdb.c @@ -128,7 +128,7 @@ /* free memory if the pointer is valid and zero the pointer */ #ifndef SAFE_FREE -#define SAFE_FREE(x) do { if ((x) != NULL) {free((x)); (x)=NULL;} } while(0) +#define SAFE_FREE(x) do { if ((x) != NULL) {free((void *) (x)); (x)=NULL;} } while(0) #endif #define BUCKET(hash) ((hash) % tdb->header.hash_size) diff --git a/source/tdb/tdbutil.c b/source/tdb/tdbutil.c index 682f8cc68e2..29fbd259044 100644 --- a/source/tdb/tdbutil.c +++ b/source/tdb/tdbutil.c @@ -43,7 +43,7 @@ static void gotalarm_sig(void) TDB_DATA make_tdb_data(const char *dptr, size_t dsize) { TDB_DATA ret; - ret.dptr = dptr; + ret.dptr = (char *) dptr; ret.dsize = dsize; return ret; } @@ -62,7 +62,7 @@ static int tdb_chainlock_with_timeout_internal( TDB_CONTEXT *tdb, TDB_DATA key, /* Allow tdb_chainlock to be interrupted by an alarm. */ int ret; gotalarm = 0; - tdb_set_lock_alarm(&gotalarm); + tdb_set_lock_alarm((sig_atomic_t *) &gotalarm); if (timeout) { CatchSignal(SIGALRM, SIGNAL_CAST gotalarm_sig); |