diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2004-07-05 22:09:11 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2004-07-05 22:09:11 +0000 |
commit | f8a1933c153966e82abfb909fe571f44d495a83c (patch) | |
tree | 1e5f8b1455cb69d635d88a68334caea49ee4f226 /riscos/save_draw.c | |
parent | 396953101891850ea8c46493bd042e2784ba9dc6 (diff) | |
download | netsurf-f8a1933c153966e82abfb909fe571f44d495a83c.tar.gz netsurf-f8a1933c153966e82abfb909fe571f44d495a83c.tar.bz2 |
[project @ 2004-07-05 22:09:11 by jmb]
Avoid some compiler warnings.
Work around issue with GCC3.3 pre2
svn path=/import/netsurf/; revision=1051
Diffstat (limited to 'riscos/save_draw.c')
-rw-r--r-- | riscos/save_draw.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/riscos/save_draw.c b/riscos/save_draw.c index fcc2ee24a..0708c9214 100644 --- a/riscos/save_draw.c +++ b/riscos/save_draw.c @@ -267,7 +267,7 @@ static bool drawbuf_save_file(const char *drawfilename) { size_t index; os_fw *handle = NULL; - os_error *error; + os_error *error = NULL; /* create font table (if needed). */ if (oDrawBuf.numFonts > 0) { @@ -415,6 +415,9 @@ bool add_box(struct box *box, unsigned long cbc, long x, long y) case CONTENT_HTML: c = box->object->data.html.layout->children; return add_box(c, cbc, x, y); + + default: + break; } } else if (box->gadget && box->gadget->type == GADGET_CHECKBOX) { @@ -683,7 +686,7 @@ bool add_line(struct box *box, unsigned long cbc, long x, long y) */ bool add_circle(struct box *box, unsigned long cbc, long x, long y) { - double radius, kappa; + double radius = 0., kappa; double cx, cy; drawfile_object *dro; drawfile_path *dp; @@ -852,9 +855,9 @@ static bool add_text(struct box *box, unsigned long cbc, long x, long y) dt->base.x = x; dt->base.y = y - box->height*512 + 1536; strncpy(dt->text, rotext, rolength); - dt->text[rolength] = 0; - for (++rolength; rolength % 4; ++rolength) - dt->text[rolength] = 0; + do { + dt->text[rolength++] = 0; + } while (rolength % 4); free(rotext); |