From 05861649cece70d65e7ba84c3696039c0143ce9c Mon Sep 17 00:00:00 2001 From: Matthias Kramm Date: Fri, 8 Jan 2010 16:30:40 -0800 Subject: [PATCH] fixed compiler warnings --- configure | 2 +- configure.in | 2 +- lib/devices/pdf.c | 1 + lib/gfxpoly/heap.h | 6 +++--- lib/gfxpoly/poly.c | 4 ++-- lib/gfxpoly/renderpoly.c | 4 ++-- lib/python/tags.c | 2 +- 7 files changed, 11 insertions(+), 10 deletions(-) diff --git a/configure b/configure index cefa0fb..043e6f2 100755 --- a/configure +++ b/configure @@ -1901,7 +1901,7 @@ if test "x${srcdir}" != "x."; then exit 1 fi -WARNINGS="-Wparentheses -Wimplicit -Wreturn-type -Wno-write-strings" +WARNINGS="-Wimplicit -Wreturn-type -Wno-write-strings" if test "x$ENABLE_WARNINGS" '!=' "x";then WARNINGS="-Wall -Wno-unused -Wno-format -Wno-redundant-decls -Wno-write-strings -D_FORTIFY_SOURCE=2 " fi diff --git a/configure.in b/configure.in index 4ed3ada..f9ff1e7 100644 --- a/configure.in +++ b/configure.in @@ -43,7 +43,7 @@ if test "x${srcdir}" != "x."; then exit 1 fi -WARNINGS="-Wparentheses -Wimplicit -Wreturn-type -Wno-write-strings" +WARNINGS="-Wimplicit -Wreturn-type -Wno-write-strings" if test "x$ENABLE_WARNINGS" '!=' "x";then WARNINGS="-Wall -Wno-unused -Wno-format -Wno-redundant-decls -Wno-write-strings -D_FORTIFY_SOURCE=2 " fi diff --git a/lib/devices/pdf.c b/lib/devices/pdf.c index ef67d49..bbbf9be 100644 --- a/lib/devices/pdf.c +++ b/lib/devices/pdf.c @@ -33,6 +33,7 @@ #include "../mem.h" #include "../gfxdevice.h" #include "../gfxtools.h" +#include "../gfximage.h" typedef struct _internal { PDF* p; diff --git a/lib/gfxpoly/heap.h b/lib/gfxpoly/heap.h index cd5114d..7987337 100644 --- a/lib/gfxpoly/heap.h +++ b/lib/gfxpoly/heap.h @@ -55,20 +55,20 @@ static t* name##_get(name##_t*h) \ break; \ } \ if(child+1 < h->size && lt(h->elements[child+1], \ - h->elements[child])) \ + h->elements[child])) \ child++; \ h->elements[node] = h->elements[child]; \ } while(lt(h->elements[child],node_p)); \ h->elements[node] = node_p; \ return r; \ } \ -static name##_init(name##_t*h) \ +static void name##_init(name##_t*h) \ { \ memset(h, 0, sizeof(*h)); \ h->max_size = 15; \ h->elements = malloc(h->max_size*sizeof(t*)); \ } \ -static name##_destroy(name##_t*h) \ +static void name##_destroy(name##_t*h) \ { \ free((h)->elements); \ } diff --git a/lib/gfxpoly/poly.c b/lib/gfxpoly/poly.c index 95a8a22..53b45e2 100644 --- a/lib/gfxpoly/poly.c +++ b/lib/gfxpoly/poly.c @@ -260,8 +260,8 @@ static void event_dump(event_t*e) } } -static inline max32(int32_t v1, int32_t v2) {return v1>v2?v1:v2;} -static inline min32(int32_t v1, int32_t v2) {return v1v2?v1:v2;} +static inline int32_t min32(int32_t v1, int32_t v2) {return v1b?a:b;} -static inline min(double a, double b) {return ab?a:b;} +static inline double min(double a, double b) {return adepth = depth; po->clipdepth = clipdepth; po->ratio = ratio; - po->name = (unsigned char*)name; + po->name = name; po->move = move; if(clipdepth) po->clipdepth = clipdepth; if(matrix) po->matrix = matrix_getMatrix(matrix); -- 1.7.10.4