From: Julian Seward Date: Sun, 22 Jan 2006 01:09:37 +0000 (+0000) Subject: Get rid of compiler warnings. X-Git-Tag: svn/VALGRIND_3_2_0~331 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=afe2b7671fb74fed689bce0b98e8b2deb06efea0;p=thirdparty%2Fvalgrind.git Get rid of compiler warnings. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5580 --- diff --git a/massif/hp2ps/HpFile.c b/massif/hp2ps/HpFile.c index ae7d6cdf07..c19b6aae97 100644 --- a/massif/hp2ps/HpFile.c +++ b/massif/hp2ps/HpFile.c @@ -446,8 +446,7 @@ IsIdChar(ch) static struct entry* hashtable[ N_HASH ]; static intish -Hash(s) - char *s; +Hash(char* s) { int r; @@ -466,7 +465,7 @@ Hash(s) */ static struct chunk* -MakeChunk() +MakeChunk(void) { struct chunk* ch; struct datapoint* d; diff --git a/massif/hp2ps/Main.c b/massif/hp2ps/Main.c index 7dfffcde60..d740f33aeb 100644 --- a/massif/hp2ps/Main.c +++ b/massif/hp2ps/Main.c @@ -66,9 +66,7 @@ intish nidents; floatish THRESHOLD_PERCENT = DEFAULT_THRESHOLD; int TWENTY = DEFAULT_TWENTY; -int main(argc, argv) -int argc; -char* argv[]; +int main(int argc, char* argv[]) { programname = copystring(Basename(argv[0])); diff --git a/massif/hp2ps/Main.h b/massif/hp2ps/Main.h index 5fa954eb4d..c743f78085 100644 --- a/massif/hp2ps/Main.h +++ b/massif/hp2ps/Main.h @@ -7,11 +7,11 @@ //#include "config.h" -#ifdef __STDC__ +//#ifdef __STDC__ #define PROTO(x) x -#else -#define PROTO(x) () -#endif +//#else +//#define PROTO(x) () +//#endif /* our own ASSERT macro (for C) */ #ifndef DEBUG diff --git a/massif/hp2ps/Shade.c b/massif/hp2ps/Shade.c index 0c1a3be09d..e828eba867 100644 --- a/massif/hp2ps/Shade.c +++ b/massif/hp2ps/Shade.c @@ -108,9 +108,7 @@ ThinkOfAShade() } static floatish -extract_colour(shade,factor) - floatish shade; - intish factor; +extract_colour(floatish shade, intish factor) { intish i,j; diff --git a/massif/hp2ps/Utilities.c b/massif/hp2ps/Utilities.c index 754cc8a01a..f9915bb94f 100644 --- a/massif/hp2ps/Utilities.c +++ b/massif/hp2ps/Utilities.c @@ -4,14 +4,14 @@ #include #include +#include #include "Main.h" #include "Error.h" +#include "Utilities.h" -extern void* malloc(); char* -Basename(name) - char* name; +Basename(char* name) { char* t; @@ -101,7 +101,6 @@ xrealloc(p, n) size_t n; { void *r; - extern void *realloc(); r = realloc(p, n); if (!r) {