[gegl] ppm-load: silence gcc warning
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] ppm-load: silence gcc warning
- Date: Fri, 6 Apr 2018 23:02:43 +0000 (UTC)
commit 2a16542cdcddec6690debb7c913a6d0836148e46
Author: Øyvind Kolås <pippin gimp org>
Date: Thu Apr 5 23:50:47 2018 +0200
ppm-load: silence gcc warning
the .bpc field of the ppm struct is being suspected of being used uninitialized
even though we bail if loading header doesnt succeed - pre-initialize to 1 to
avoid warnings.
operations/external/ppm-load.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/operations/external/ppm-load.c b/operations/external/ppm-load.c
index 146568e..5d4a408 100644
--- a/operations/external/ppm-load.c
+++ b/operations/external/ppm-load.c
@@ -225,6 +225,8 @@ get_bounding_box (GeglOperation *operation)
pnm_struct img;
FILE *fp;
+ img.bpc = 1;
+
fp = (!strcmp (o->path, "-") ? stdin : fopen (o->path,"rb") );
if (!fp)
@@ -276,6 +278,8 @@ process (GeglOperation *operation,
GeglRectangle rect = {0,0,0,0};
gboolean ret = FALSE;
+ img.bpc = 1;
+
fp = (!strcmp (o->path, "-") ? stdin : fopen (o->path,"rb"));
if (!fp)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]