diff --git a/plug-ins/file-psd/psd-export.c b/plug-ins/file-psd/psd-export.c index 75c992cc85..8ea9b9f3b4 100644 --- a/plug-ins/file-psd/psd-export.c +++ b/plug-ins/file-psd/psd-export.c @@ -1535,7 +1535,7 @@ save_layer_and_mask (GOutputStream *output, ChanSize = sizeof (gint32) + (layerWidth * layerHeight * bpc); write_gint64 (output, ChanSize, "Channel Size"); } - IFDBG(1) g_debug ("\t\t\tLength: %" G_GSIZE_FORMAT, ChanSize); + IFDBG(1) g_debug ("\t\t\tLength: %" G_GSIZE_FORMAT, (gsize) ChanSize); } xfwrite (output, "8BIM", 4, "blend mode signature"); @@ -1731,7 +1731,7 @@ save_layer_and_mask (GOutputStream *output, write_gint64 (output, eof_pos - LayerInfoPos - sizeof (gint64), "layers info section length"); IFDBG(1) g_debug ("\t\tTotal layers info section length: %" - G_GSIZE_FORMAT, + G_GINT64_FORMAT, (gint64) (eof_pos - LayerInfoPos - sizeof (gint64))); } @@ -1752,7 +1752,7 @@ save_layer_and_mask (GOutputStream *output, write_gint64 (output, eof_pos - LayerMaskPos - sizeof (gint64), "layers & mask information length"); IFDBG(1) g_debug ("\t\tTotal layers & mask information length: %" - G_GSIZE_FORMAT, + G_GINT64_FORMAT, (gint64) (eof_pos - LayerMaskPos - sizeof (gint64))); } diff --git a/plug-ins/file-psd/psd-image-res-load.c b/plug-ins/file-psd/psd-image-res-load.c index ca8007ffe0..232650dbbc 100644 --- a/plug-ins/file-psd/psd-image-res-load.c +++ b/plug-ins/file-psd/psd-image-res-load.c @@ -288,7 +288,7 @@ get_image_resource_header (PSDimageres *res_a, res_a->data_start = g_seekable_tell (G_SEEKABLE (input)); IFDBG(2) g_debug ("Type: %.4s, id: %d, start: %" G_GOFFSET_FORMAT ", len: %" G_GSIZE_FORMAT, - res_a->type, res_a->id, res_a->data_start, res_a->data_len); + res_a->type, res_a->id, res_a->data_start, (gsize) res_a->data_len); return 0; } diff --git a/plug-ins/file-psd/psd-load.c b/plug-ins/file-psd/psd-load.c index a6036b2507..152af6c114 100644 --- a/plug-ins/file-psd/psd-load.c +++ b/plug-ins/file-psd/psd-load.c @@ -927,7 +927,7 @@ read_layer_info (PSDimage *img_a, img_a->layer_data_len += lyr_a[lidx]->chn_info[cidx].data_len; IFDBG(3) g_debug ("Channel ID %d, data len %" G_GSIZE_FORMAT, lyr_a[lidx]->chn_info[cidx].channel_id, - lyr_a[lidx]->chn_info[cidx].data_len); + (gsize) lyr_a[lidx]->chn_info[cidx].data_len); } if (psd_read (input, lyr_a[lidx]->mode_key, 4, error) < 4 || @@ -988,12 +988,12 @@ read_layer_info (PSDimage *img_a, lyr_a[lidx]->blend_mode, lyr_a[lidx]->opacity, lyr_a[lidx]->clipping, - lyr_a[lidx]->extra_len, + (gsize) lyr_a[lidx]->extra_len, lyr_a[lidx]->layer_flags.trans_prot, lyr_a[lidx]->layer_flags.visible, lyr_a[lidx]->layer_flags.irrelevant); IFDBG(3) g_debug ("Offset: %" G_GOFFSET_FORMAT ", Remaining length %" G_GSIZE_FORMAT, - PSD_TELL(input), block_rem); + PSD_TELL(input), (gsize) block_rem); if (! lyr_a[lidx]->layer_flags.irrelevant) { @@ -1047,14 +1047,14 @@ read_layer_info (PSDimage *img_a, g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED, _("Unsupported or invalid mask info size.")); /* Translations have problems with using G_GSIZE_FORMAT, let's use g_debug. */ - g_debug ("Unsupported or invalid mask info size: %" G_GSIZE_FORMAT, block_len); + g_debug ("Unsupported or invalid mask info size: %" G_GSIZE_FORMAT, (gsize) block_len); free_lyr_a (lyr_a, img_a->num_layers); return NULL; } block_rem -= (block_len + 4); IFDBG(3) g_debug ("Offset: %" G_GOFFSET_FORMAT ", Remaining length %" G_GSIZE_FORMAT, - PSD_TELL(input), block_rem); + PSD_TELL(input), (gsize) block_rem); lyr_a[lidx]->layer_mask_extra.top = 0; lyr_a[lidx]->layer_mask_extra.left = 0; @@ -1268,9 +1268,9 @@ read_layer_info (PSDimage *img_a, block_len = GUINT32_FROM_BE (block_len); block_rem -= (block_len + 4); IFDBG(3) g_debug ("Blending ranges size %" G_GSIZE_FORMAT - " (not imported)", block_len); + " (not imported)", (gsize) block_len); IFDBG(3) g_debug ("Offset: %" G_GOFFSET_FORMAT ", Remaining length %" G_GSIZE_FORMAT, - PSD_TELL(input), block_rem); + PSD_TELL(input), (gsize) block_rem); if (block_len > 0) { @@ -1292,7 +1292,7 @@ read_layer_info (PSDimage *img_a, block_rem -= read_len; IFDBG(3) g_debug ("Offset: %" G_GOFFSET_FORMAT ", Remaining length %" G_GSIZE_FORMAT, - PSD_TELL(input), block_rem); + PSD_TELL(input), (gsize) block_rem); /* Adjustment layer info */ /* FIXME */ lyr_a[lidx]->layer_styles = g_new (PSDLayerStyles, 1); @@ -1302,7 +1302,7 @@ read_layer_info (PSDimage *img_a, { gint header_size; IFDBG(3) g_debug ("Offset: %" G_GOFFSET_FORMAT ", Remaining length %" G_GSIZE_FORMAT, - PSD_TELL(input), block_rem); + PSD_TELL(input), (gsize) block_rem); header_size = get_layer_resource_header (&res_a, img_a->version, input, error); if (header_size < 0) { @@ -1339,7 +1339,7 @@ read_layer_info (PSDimage *img_a, return NULL; } block_rem -= res_a.data_len; - IFDBG(3) g_debug ("Remaining length in block: %" G_GSIZE_FORMAT, block_rem); + IFDBG(3) g_debug ("Remaining length in block: %" G_GSIZE_FORMAT, (gsize) block_rem); } if (block_rem > 0) { @@ -1362,7 +1362,7 @@ read_layer_info (PSDimage *img_a, IFDBG(1) g_debug ("Layer image data block start %" G_GOFFSET_FORMAT ", size %" G_GSIZE_FORMAT ", end: %" G_GOFFSET_FORMAT, - img_a->layer_data_start, img_a->layer_data_len, PSD_TELL(input)); + img_a->layer_data_start, (gsize) img_a->layer_data_len, PSD_TELL(input)); } return lyr_a; @@ -1467,7 +1467,7 @@ read_layer_block (PSDimage *img_a, { IFDBG(1) g_debug ("Unexpectedly block_len %" G_GSIZE_FORMAT " is larger than total_len %" G_GSIZE_FORMAT, - block_len, total_len); + (gsize) block_len, (gsize) total_len); block_len = total_len; } total_len -= block_len; @@ -1538,7 +1538,7 @@ read_layer_block (PSDimage *img_a, /* Not fatal just skip remainder of this block. */ g_debug ("Invalid resource block length: %" G_GSIZE_FORMAT " is larger than maximum %" G_GSIZE_FORMAT, - res_a.data_len, total_len); + (gsize) res_a.data_len, (gsize) total_len); break; } @@ -1849,9 +1849,9 @@ read_RLE_channel (PSDimage *img_a, IFDBG(4) g_debug ("RLE channel length %" G_GSIZE_FORMAT ", RLE length data: %d, " "RLE data block: %" G_GSIZE_FORMAT, - channel_data_len - 2, + (gsize) channel_data_len - 2, rle_row_size, - (channel_data_len - 2 - rle_row_size)); + (gsize) (channel_data_len - 2 - rle_row_size)); rle_pack_len = g_malloc (lyr_chn->rows * 4); /* Always 4 since this is the data size in memory. */ for (rowi = 0; rowi < lyr_chn->rows; ++rowi) { @@ -2245,7 +2245,7 @@ add_layers (GimpImage *image, { case PSD_COMP_RAW: /* Planar raw data */ IFDBG(3) g_debug ("Raw data length: %" G_GSIZE_FORMAT, - lyr_a[lidx]->chn_info[cidx].data_len - 2); + (gsize) lyr_a[lidx]->chn_info[cidx].data_len - 2); if (read_channel_data (lyr_chn[cidx], img_a->bps, PSD_COMP_RAW, NULL, input, 0, error) < 1)