From 88e2d8e292e687d3193dcaff62ffd5f2ab4f72ad Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Tue, 1 Jul 2003 20:23:51 +0000 Subject: [PATCH] gcc-warnings-cleanup-20030701 FIXES 1650 add headers, cleanup castings --- src/afsd/afsd.c | 2 +- src/bozo/bos_util.c | 2 +- src/rx/bulktest/Makefile.in | 2 +- src/rx/multi.example/Makefile.in | 2 +- src/rx/simple.example/Makefile.in | 2 +- src/sys/rmtsysc.c | 3 +++ src/uss/uss_common.h | 7 +++++++ src/util/potpourri.h | 1 + src/util/test/Makefile.in | 2 +- src/venus/fs.c | 7 ------- src/venus/kdump.c | 2 +- 11 files changed, 18 insertions(+), 14 deletions(-) diff --git a/src/afsd/afsd.c b/src/afsd/afsd.c index af5773b49..7b06b1dfa 100644 --- a/src/afsd/afsd.c +++ b/src/afsd/afsd.c @@ -2177,7 +2177,7 @@ long param1, param2, param3, param4, param5, param6, param7; eparm[2] = param6; eparm[3] = param7; - param4 = eparm; + param4 = (long) eparm; #endif error = syscall(AFS_SYSCALL, AFSCALL_CALL, param1, param2, param3, param4, param5, param6, param7); diff --git a/src/bozo/bos_util.c b/src/bozo/bos_util.c index fbf341133..190cd12bb 100644 --- a/src/bozo/bos_util.c +++ b/src/bozo/bos_util.c @@ -195,7 +195,7 @@ main(int argc, char **argv) printf("kvno %4d: key is '%s' '", tkeys.key[i].kvno, tbuffer); strcpy(x,(char *)tbuffer); for(count=0;count<8;count++) - printf("\\%03o",(unsigned char *)x[count]); + printf("\\%03o", x[count]); printf("'\n"); } } diff --git a/src/rx/bulktest/Makefile.in b/src/rx/bulktest/Makefile.in index 7c690d5e2..d4f8988bf 100644 --- a/src/rx/bulktest/Makefile.in +++ b/src/rx/bulktest/Makefile.in @@ -14,7 +14,7 @@ LIBRX=${SRCDIR}/lib/librx.a DESTDIR=/usr/andy/ INSTALL=${SRCDIR}/bin/install LIBS=${LIBRX} ${SRCDIR}/lib/liblwp.a -CFLAGS=-g -I.. -I. -I${SRCDIR}/include -DDEBUG ${XCFLAGS} +CFLAGS=${DBG} -I.. -I. -I${SRCDIR}/include -DDEBUG ${XCFLAGS} all: bulk_client bulk_server diff --git a/src/rx/multi.example/Makefile.in b/src/rx/multi.example/Makefile.in index 8dd14725b..cb6eef53f 100644 --- a/src/rx/multi.example/Makefile.in +++ b/src/rx/multi.example/Makefile.in @@ -14,7 +14,7 @@ LIBRX=${SRCDIR}/lib/librx.a DESTDIR=/usr/andy/ INSTALL=${SRCDIR}/bin/install LIBS=${LIBRX} ${SRCDIR}/lib/liblwp.a -CFLAGS=-g -I.. -I. -I${SRCDIR}/include -DDEBUG ${XCFLAGS} +CFLAGS=${DBG} -I.. -I. -I${SRCDIR}/include -DDEBUG ${XCFLAGS} all: sample_client sample_server diff --git a/src/rx/simple.example/Makefile.in b/src/rx/simple.example/Makefile.in index 191b70a7e..d974c0da8 100644 --- a/src/rx/simple.example/Makefile.in +++ b/src/rx/simple.example/Makefile.in @@ -14,7 +14,7 @@ LIBRX=${SRCDIR}/lib/librx.a DESTDIR=/usr/andy/ INSTALL=${SRCDIR}/bin/install LIBS=${LIBRX} ${SRCDIR}/lib/liblwp.a -CFLAGS=-g -I. -I${SRCDIR}/include -DDEBUG ${XCFLAGS} +CFLAGS=${DBG} -I. -I${SRCDIR}/include -DDEBUG ${XCFLAGS} all: sample_client sample_server diff --git a/src/sys/rmtsysc.c b/src/sys/rmtsysc.c index 1e1fcd107..04ae46c8f 100644 --- a/src/sys/rmtsysc.c +++ b/src/sys/rmtsysc.c @@ -33,6 +33,9 @@ RCSID("$Header$"); #ifdef HAVE_STRING_H #include #endif +#ifdef HAVE_UNISTD_H +#include +#endif #include #include "rmtsys.h" diff --git a/src/uss/uss_common.h b/src/uss/uss_common.h index 782fc1bfc..f3e40496d 100644 --- a/src/uss/uss_common.h +++ b/src/uss/uss_common.h @@ -23,6 +23,13 @@ #include /*I/O stuff*/ #include #include +#ifdef HAVE_STRING_H +#include +#else +#ifdef HAVE_STRINGS_H +#include +#endif +#endif /* * --------------------- Exported definitions --------------------- diff --git a/src/util/potpourri.h b/src/util/potpourri.h index 3d7bb8685..9849e3ecd 100644 --- a/src/util/potpourri.h +++ b/src/util/potpourri.h @@ -92,6 +92,7 @@ Abstract: Contains miscellaneous general-purpose macros. BEWARE: avoid quotes in the assertion!! Also beware: you cannot make the NOASSERT case a null macro, because of side effects */ +#undef assert #ifndef NOASSERT #define assert(ex) {if (!(ex)){fprintf(stderr,"Assertion failed: file %s, line %d\n", __FILE__, __LINE__);fprintf(stderr, "\t%s\n", # ex); abort();}} #else diff --git a/src/util/test/Makefile.in b/src/util/test/Makefile.in index 10fb7c8aa..f99bfd508 100644 --- a/src/util/test/Makefile.in +++ b/src/util/test/Makefile.in @@ -9,7 +9,7 @@ srcdir=@srcdir@ include @TOP_OBJDIR@/src/config/Makefile.config -CFLAGS = -I. -I.. -I${SRCDIR}/include ${XCFLAGS} -g +CFLAGS = -I. -I.. -I${SRCDIR}/include ${XCFLAGS} ${DBG} tests: test_ktime ktest dirpath_test diff --git a/src/venus/fs.c b/src/venus/fs.c index 3fed75dd3..18ac2a13b 100644 --- a/src/venus/fs.c +++ b/src/venus/fs.c @@ -51,13 +51,6 @@ RCSID("$Header$"); #include #include #include -#ifdef HAVE_STRING_H -#include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif #include #include diff --git a/src/venus/kdump.c b/src/venus/kdump.c index f269bbb93..304cb3c12 100644 --- a/src/venus/kdump.c +++ b/src/venus/kdump.c @@ -55,7 +55,7 @@ struct ncp_sb_info{}; #define u16 unsigned short #include #if __GLIBC_MINOR__ >= 2 -#define _SYS_TYPES_H +#define _SYS_TYPES_H 1 #endif #define __KERNEL__ #endif -- 2.39.5