[gimp] plug-ins: fix uninitialized warnings.



commit 9a05f24a031a3fa489d01057e881541c4a8ba607
Author: Jehan <jehan girinstud io>
Date:   Tue Dec 15 03:24:02 2020 +0100

    plug-ins: fix uninitialized warnings.
    
    This fixes various similar warnings:
    
    > file-xmc.c:2276:53: warning: ‘save_rgn.height’ may be used uninitialized in this function
    
    Note that I have not looked in details, but it would seem that these are
    actually initialized by get_cropped_region() which uses goto-s quite
    extensively, so obviously it's hard to follow (for humans as well as for
    the compiler). So let's just assume there is no code error and let's
    just add default initialization to silence the compiler.

 plug-ins/common/file-xmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/plug-ins/common/file-xmc.c b/plug-ins/common/file-xmc.c
index 180cf67fae..2804dd1454 100644
--- a/plug-ins/common/file-xmc.c
+++ b/plug-ins/common/file-xmc.c
@@ -1351,7 +1351,7 @@ save_image (GFile         *file,
   GList           *list;
   GList           *orig_list;
   gchar           *framename;              /* framename of a layer */
-  GeglRectangle    save_rgn;               /* region to save */
+  GeglRectangle    save_rgn = { 0 };       /* region to save */
   gint             layer_xoffset, layer_yoffset;
   /* temporary buffer which store pixel data (guchar * bpp = guint32) */
   guint32          pixelbuf[SQR (MAX_SAVE_DIMENSION)];


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]