fixed compiler warnings
authorMatthias Kramm <kramm@quiss.org>
Sat, 9 Jan 2010 00:30:40 +0000 (16:30 -0800)
committerMatthias Kramm <kramm@quiss.org>
Sat, 9 Jan 2010 00:30:40 +0000 (16:30 -0800)
configure
configure.in
lib/devices/pdf.c
lib/gfxpoly/heap.h
lib/gfxpoly/poly.c
lib/gfxpoly/renderpoly.c
lib/python/tags.c

index cefa0fb..043e6f2 100755 (executable)
--- 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
index 4ed3ada..f9ff1e7 100644 (file)
@@ -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
index ef67d49..bbbf9be 100644 (file)
@@ -33,6 +33,7 @@
 #include "../mem.h"
 #include "../gfxdevice.h"
 #include "../gfxtools.h"
+#include "../gfximage.h"
 
 typedef struct _internal {
     PDF* p;
index cd5114d..7987337 100644 (file)
@@ -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);                                               \
 }
index 95a8a22..53b45e2 100644 (file)
@@ -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 v1<v2?v1:v2;}
+static inline int32_t max32(int32_t v1, int32_t v2) {return v1>v2?v1:v2;}
+static inline int32_t min32(int32_t v1, int32_t v2) {return v1<v2?v1:v2;}
 
 static void segment_dump(segment_t*s)
 {
index 9c9f11f..57e341c 100644 (file)
@@ -198,8 +198,8 @@ unsigned char* render_polygon(gfxpoly_t*polygon, intbbox_t*bbox, double zoom, wi
 #define MAX_WIDTH 8192
 #define MAX_HEIGHT 4096
 
-static inline max(double a, double b) {return a>b?a:b;}
-static inline min(double a, double b) {return a<b?a:b;}
+static inline double max(double a, double b) {return a>b?a:b;}
+static inline double min(double a, double b) {return a<b?a:b;}
 
 static int adjust_x(int xmin, int xmax)
 {
index 455e87f..2cd47c9 100644 (file)
@@ -186,7 +186,7 @@ static PyObject* po_create(PyObject* self, PyObject* args, PyObject* kwargs,char
     po->depth = 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);