fixed some compiler warnings
authorMatthias Kramm <kramm@quiss.org>
Tue, 15 Jun 2010 00:58:26 +0000 (17:58 -0700)
committerMatthias Kramm <kramm@quiss.org>
Tue, 15 Jun 2010 00:58:26 +0000 (17:58 -0700)
lib/as3/pool.c
lib/devices/render.c
lib/gfxfont.c
lib/gfxpoly/convert.c
lib/gfxtools.c
src/png2swf.c

index 4cd4352..ce279a3 100644 (file)
@@ -209,7 +209,7 @@ namespace_t* namespace_fromstring(const char*name)
     namespace_t*ns = malloc(sizeof(namespace_t));
     memset(ns, 0, sizeof(namespace_t));
     if(name[0] == '[') {
     namespace_t*ns = malloc(sizeof(namespace_t));
     memset(ns, 0, sizeof(namespace_t));
     if(name[0] == '[') {
-        U8 access;
+        U8 access = 0;
         char*n = strdup(name);
         char*bracket = strchr(n, ']');
         if(bracket) {
         char*n = strdup(name);
         char*bracket = strchr(n, ']');
         if(bracket) {
index 250356a..8586cfa 100644 (file)
@@ -608,7 +608,7 @@ void render_stroke(struct _gfxdevice*dev, gfxline_t*line, gfxcoord_t width, gfxc
 static void draw_line(gfxdevice_t*dev, gfxline_t*line)
 {
     internal_t*i = (internal_t*)dev->internal;
 static void draw_line(gfxdevice_t*dev, gfxline_t*line)
 {
     internal_t*i = (internal_t*)dev->internal;
-    double x,y;
+    double x=0,y=0;
 
     while(line)
     {
 
     while(line)
     {
index 549e50d..920796d 100644 (file)
@@ -395,7 +395,7 @@ gfxfont_t* gfxfont_load(const char*id, const char*filename, unsigned int flags,
                }
                l = l->next;
            }
                }
                l = l->next;
            }
-           if(!ok && !name) {
+           if(!ok && !hasname) {
                gfxline_free(font->glyphs[font->num_glyphs].line);
                font->glyphs[font->num_glyphs].line = 0;
                font->glyphs[font->num_glyphs].advance = 0;
                gfxline_free(font->glyphs[font->num_glyphs].line);
                font->glyphs[font->num_glyphs].line = 0;
                font->glyphs[font->num_glyphs].advance = 0;
index bb01942..9fbe40d 100644 (file)
@@ -93,10 +93,10 @@ static void convert_file(const char*filename, polywriter_t*w, double gridsize)
         double x,y;
         char s[256];
         if(sscanf(line, "%lf %lf %s", &x, &y, (char*)&s) == 3) {
         double x,y;
         char s[256];
         if(sscanf(line, "%lf %lf %s", &x, &y, (char*)&s) == 3) {
-            if(s && !strcmp(s,"moveto")) {
+            if(!strcmp(s,"moveto")) {
                w->moveto(w, convert_coord(x,z), convert_coord(y,z));
                 count++;
                w->moveto(w, convert_coord(x,z), convert_coord(y,z));
                 count++;
-            } else if(s && !strcmp(s,"lineto")) {
+            } else if(!strcmp(s,"lineto")) {
                w->lineto(w, convert_coord(x,z), convert_coord(y,z));
                 count++;
             } else {
                w->lineto(w, convert_coord(x,z), convert_coord(y,z));
                 count++;
             } else {
index 7160033..082eefa 100644 (file)
@@ -205,8 +205,8 @@ static double get_spline_len(qspline_abc_t*s)
 void gfxtool_draw_dashed_line(gfxdrawer_t*d, gfxline_t*line, float*r, float phase)
 {
     double x=0,y=0;
 void gfxtool_draw_dashed_line(gfxdrawer_t*d, gfxline_t*line, float*r, float phase)
 {
     double x=0,y=0;
-    double linepos,nextpos;
-    char on;
+    double linepos = 0,nextpos = 0;
+    char on = 0;
     int apos=0;
 
     if(line && line->type != gfx_moveTo) {
     int apos=0;
 
     if(line && line->type != gfx_moveTo) {
@@ -911,7 +911,7 @@ gfxbbox_t* gfxline_isrectangle(gfxline_t*_l)
     gfxline_t*l = gfxline_clone(_l);
     gfxline_optimize(l);
 
     gfxline_t*l = gfxline_clone(_l);
     gfxline_optimize(l);
 
-    double x1,x2,y1,y2;
+    double x1=0,x2=0,y1=0,y2=0;
     int xc=0,yc=0;
     char corners=0;
 
     int xc=0,yc=0;
     char corners=0;
 
index 8d1c476..83cc31d 100644 (file)
@@ -454,7 +454,7 @@ void applyfilter1(int mode, U8*src, U8*old, U8*dest, int width)
 
 }
 
 
 }
 
-TAG* PNG2Image(TAG*t, U16 id, char*filename, int*width, int*height)
+TAG* PNG2Image(TAG*t, U16 id, char*filename, unsigned*width, unsigned*height)
 {
     char tagid[4];
     U8*data;
 {
     char tagid[4];
     U8*data;