From: Erwin Janssen Date: Mon, 11 Jul 2016 22:45:09 +0000 (+0200) Subject: Fixed various Wundef warnings. X-Git-Tag: untagged-9ee5934fa10f12b4043f^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4fb9e2f95e300bb105500a41df49d464b2636b43;p=graphviz Fixed various Wundef warnings. --- diff --git a/cmd/smyrna/gui/toolboxcallbacks.h b/cmd/smyrna/gui/toolboxcallbacks.h index 34d2e2db6..1266bb5b5 100755 --- a/cmd/smyrna/gui/toolboxcallbacks.h +++ b/cmd/smyrna/gui/toolboxcallbacks.h @@ -15,7 +15,7 @@ #define TOOLBOXCALLBACKS_H #include #include "gui.h" -#if WIN32 +#if defined(WIN32) #define _BB __declspec(dllexport) #else #define _BB /**/ diff --git a/lib/cgraph/io.c b/lib/cgraph/io.c index c677c4f6b..8164379dc 100644 --- a/lib/cgraph/io.c +++ b/lib/cgraph/io.c @@ -13,7 +13,7 @@ #include #include -#if WIN32 +#if defined(WIN32) #include #endif diff --git a/lib/cgraph/mem.c b/lib/cgraph/mem.c index 391b3ac94..2c5544e78 100644 --- a/lib/cgraph/mem.c +++ b/lib/cgraph/mem.c @@ -15,12 +15,12 @@ /* memory management discipline and entry points */ -#if (HAVE_AST || HAVE_VMALLOC) +#if defined(HAVE_AST) || defined(HAVE_VMALLOC) /* vmalloc based allocator */ static void *memopen(void) { -#if DEBUG || MEMDEBUG +#if defined(DEBUG) || defined(MEMDEBUG) return vmopen(Vmdcheap, Vmdebug, VM_MTDEBUG | VM_DBCHECK | VM_DBABORT | VM_TRACE); #else diff --git a/lib/pathplan/route.c b/lib/pathplan/route.c index 70ae5fa5d..5ab2863f2 100644 --- a/lib/pathplan/route.c +++ b/lib/pathplan/route.c @@ -352,7 +352,7 @@ static int splinefits(Pedge_t * edges, int edgen, Ppoint_t pa, growops(opl + 4); for (pi = 1; pi < 4; pi++) ops[opl].x = sps[pi].x, ops[opl++].y = sps[pi].y; -#if DEBUG >= 1 +#if defined(DEBUG) && DEBUG >= 1 fprintf(stderr, "success: %f %f\n", a, b); #endif return 1; @@ -362,7 +362,7 @@ static int splinefits(Pedge_t * edges, int edgen, Ppoint_t pa, growops(opl + 4); for (pi = 1; pi < 4; pi++) ops[opl].x = sps[pi].x, ops[opl++].y = sps[pi].y; -#if DEBUG >= 1 +#if defined(DEBUG) && DEBUG >= 1 fprintf(stderr, "forced straight line: %f %f\n", a, b); #endif return 1; @@ -374,7 +374,7 @@ static int splinefits(Pedge_t * edges, int edgen, Ppoint_t pa, else a = b = 0; } -#if DEBUG >= 1 +#if defined(DEBUG) && DEBUG >= 1 fprintf(stderr, "failure\n"); #endif return 0; diff --git a/lib/pathplan/shortest.c b/lib/pathplan/shortest.c index fb47d68cd..e0c84128b 100644 --- a/lib/pathplan/shortest.c +++ b/lib/pathplan/shortest.c @@ -162,7 +162,7 @@ int Pshortestpath(Ppoly_t * polyp, Ppoint_t * eps, Ppolyline_t * output) } } -#if DEBUG >= 1 +#if defined(DEBUG) && DEBUG >= 1 fprintf(stderr, "points\n%d\n", pnll); for (pnli = 0; pnli < pnll; pnli++) fprintf(stderr, "%f %f\n", pnls[pnli].pp->x, pnls[pnli].pp->y); @@ -171,7 +171,7 @@ int Pshortestpath(Ppoly_t * polyp, Ppoint_t * eps, Ppolyline_t * output) /* generate list of triangles */ triangulate(pnlps, pnll); -#if DEBUG >= 2 +#if defined(DEBUG) && DEBUG >= 2 fprintf(stderr, "triangles\n%d\n", tril); for (trii = 0; trii < tril; trii++) for (ei = 0; ei < 3; ei++) @@ -283,7 +283,7 @@ int Pshortestpath(Ppoly_t * polyp, Ppoint_t * eps, Ppolyline_t * output) } } -#if DEBUG >= 1 +#if defined(DEBUG) && DEBUG >= 1 fprintf(stderr, "polypath"); for (pnlp = &epnls[1]; pnlp; pnlp = pnlp->link) fprintf(stderr, " %f %f", pnlp->pp->x, pnlp->pp->y); diff --git a/lib/vmalloc/vmhdr.h b/lib/vmalloc/vmhdr.h index b014b2eed..3a2595490 100644 --- a/lib/vmalloc/vmhdr.h +++ b/lib/vmalloc/vmhdr.h @@ -481,7 +481,7 @@ extern "C" { #if !_typ_ssize_t typedef int ssize_t; #endif -#if !_WIN32 +#if !defined(_WIN32) extern Vmuchar_t *sbrk _ARG_((ssize_t)); #endif