From 7cbde5a64857e9f14989a74ef834febcec9f4f00 Mon Sep 17 00:00:00 2001 From: kramm Date: Sun, 6 Apr 2008 16:50:21 +0000 Subject: [PATCH] clear fillinfo_t before use (fix valgrind 'uninitialized byte' warning) --- lib/devices/render.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/devices/render.c b/lib/devices/render.c index a0f2031..f8dbbe2 100644 --- a/lib/devices/render.c +++ b/lib/devices/render.c @@ -438,6 +438,7 @@ void fill(gfxdevice_t*dev, fillinfo_t*fill) void fill_solid(gfxdevice_t*dev, gfxcolor_t* color) { fillinfo_t info; + memset(&info, 0, sizeof(info)); info.type = filltype_solid; info.color = color; fill(dev, &info); @@ -588,6 +589,7 @@ void render_startclip(struct _gfxdevice*dev, gfxline_t*line) { internal_t*i = (internal_t*)dev->internal; fillinfo_t info; + memset(&info, 0, sizeof(info)); newclip(dev); info.type = filltype_clip; draw_line(dev, line); @@ -619,6 +621,7 @@ void render_fillbitmap(struct _gfxdevice*dev, gfxline_t*line, gfximage_t*img, gf draw_line(dev, line); fillinfo_t info; + memset(&info, 0, sizeof(info)); info.type = filltype_bitmap; info.image = img; info.matrix = &m2; -- 1.7.10.4