[gimp] plug-ins: clean up warnings from psd-save.



commit f1317807773b19feef91b4705d0ee169e6128193
Author: Jehan <jehan girinstud io>
Date:   Fri Oct 1 19:43:49 2021 +0200

    plug-ins: clean up warnings from psd-save.
    
    These warnings only happens on debug output, so it's not huge bugs, yet
    it's always better not to have warnings at build time.
    
    Most are printf format type warnings, and one is because of uncomplete
    switch() cases.

 plug-ins/file-psd/psd-save.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/plug-ins/file-psd/psd-save.c b/plug-ins/file-psd/psd-save.c
index fd8c851e16..0857430436 100644
--- a/plug-ins/file-psd/psd-save.c
+++ b/plug-ins/file-psd/psd-save.c
@@ -1111,6 +1111,7 @@ save_layer_and_mask (GOutputStream  *output,
             case PSD_LAYER_TYPE_LAYER:       type = "normal layer"; break;
             case PSD_LAYER_TYPE_GROUP_START: type = "group start marker"; break;
             case PSD_LAYER_TYPE_GROUP_END:   type = "group end marker"; break;
+            default:                         type = "unknown"; break;
             }
 
           printf ("\t\tType: %s\n", type);
@@ -1387,7 +1388,7 @@ write_pixel_data (GOutputStream  *output,
   goffset        length_table_pos;     /* position in file of the length table */
   int            i, j;
 
-  IFDBG printf (" Function: write_pixel_data, drw %d, lto %d\n",
+  IFDBG printf (" Function: write_pixel_data, drw %d, lto %ld\n",
                 gimp_item_get_id (GIMP_ITEM (drawable)), ltable_offset);
 
   if (write_mask)
@@ -1469,7 +1470,7 @@ write_pixel_data (GOutputStream  *output,
           xfwrite (output, LengthsTable, height * sizeof(gint16),
                    "Dummy RLE length");
           len += height * sizeof(gint16);
-          IF_DEEP_DBG printf ("\t\t\t\t. ltable, pos %ld len %d\n", length_table_pos, len);
+          IF_DEEP_DBG printf ("\t\t\t\t. ltable, pos %ld len %lu\n", length_table_pos, len);
         }
 
       for (y = 0; y < height; y += tile_height)
@@ -1505,7 +1506,7 @@ write_pixel_data (GOutputStream  *output,
                            ChanLenPosition[i], G_SEEK_SET,
                            NULL, NULL /*FIXME: error*/);
           write_gint32 (output, len, "channel data length");
-          IFDBG printf ("\t\tUpdating data len to %d\n", len);
+          IFDBG printf ("\t\tUpdating data len to %lu\n", len);
         }
       g_seekable_seek (G_SEEKABLE (output),
                        0, G_SEEK_END,
@@ -1544,7 +1545,7 @@ write_pixel_data (GOutputStream  *output,
           xfwrite (output, LengthsTable, height * sizeof(gint16),
                    "Dummy RLE length");
           len += height * sizeof(gint16);
-          IF_DEEP_DBG printf ("\t\t\t\t. ltable, pos %ld len %d\n",
+          IF_DEEP_DBG printf ("\t\t\t\t. ltable, pos %ld len %lu\n",
                               length_table_pos, len);
         }
 
@@ -1587,7 +1588,7 @@ write_pixel_data (GOutputStream  *output,
                            NULL, NULL /*FIXME: error*/);
 
           write_gint32 (output, len, "channel data length");
-          IFDBG printf ("\t\tUpdating data len to %d, at %ld\n", len, g_seekable_tell (G_SEEKABLE (output)));
+          IFDBG printf ("\t\tUpdating data len to %lu, at %ld\n", len, g_seekable_tell (G_SEEKABLE 
(output)));
         }
       g_seekable_seek (G_SEEKABLE (output),
                        0, G_SEEK_END,


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