mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-04 01:43:24 +00:00
plug-ins, libgimpconfig: Fix minor warnings
- file-psd, sig[4] and block_len variables are initialized to stop uninitialized warnings - file-xpm, g_file_peek_path () is cast to (char *) to stop "discarded const" warnings - gimpconfig-serialized.c, %llu is used instead of %lu to stop overflow warning
This commit is contained in:
parent
28fc941c53
commit
c01ffee74f
4 changed files with 10 additions and 8 deletions
|
@ -288,7 +288,7 @@ gimp_config_serialize_property (GimpConfig *config,
|
|||
|
||||
data = g_bytes_get_data (bytes, &data_length);
|
||||
|
||||
gimp_config_writer_printf (writer, "%lu", data_length);
|
||||
gimp_config_writer_printf (writer, "%llu", data_length);
|
||||
gimp_config_writer_data (writer, data_length, data);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -385,7 +385,8 @@ load_image (GFile *file,
|
|||
gimp_file_get_utf8_name (file));
|
||||
|
||||
/* read the raw file */
|
||||
switch (XpmReadFileToXpmImage (g_file_peek_path (file), &xpm_image, NULL))
|
||||
switch (XpmReadFileToXpmImage ((char *) g_file_peek_path (file),
|
||||
&xpm_image, NULL))
|
||||
{
|
||||
case XpmSuccess:
|
||||
break;
|
||||
|
@ -842,7 +843,8 @@ save_image (GFile *file,
|
|||
xpm_image->data = ibuff;
|
||||
|
||||
/* do the save */
|
||||
switch (XpmWriteFileFromXpmImage (g_file_peek_path (file), xpm_image, NULL))
|
||||
switch (XpmWriteFileFromXpmImage ((char *) g_file_peek_path (file),
|
||||
xpm_image, NULL))
|
||||
{
|
||||
case XpmSuccess:
|
||||
success = TRUE;
|
||||
|
|
|
@ -485,7 +485,7 @@ read_header_block (PSDimage *img_a,
|
|||
GInputStream *input,
|
||||
GError **error)
|
||||
{
|
||||
gchar sig[4];
|
||||
gchar sig[4] = {0};
|
||||
gchar buf[6];
|
||||
|
||||
if (psd_read (input, sig, 4, error) < 4 ||
|
||||
|
|
|
@ -158,7 +158,7 @@ read_header_block (PSDimage *img_a,
|
|||
GError **error)
|
||||
{
|
||||
guint16 version;
|
||||
gchar sig[4];
|
||||
gchar sig[4] = {0};
|
||||
gchar buf[6];
|
||||
|
||||
if (psd_read (input, sig, 4, error) < 4 ||
|
||||
|
@ -209,7 +209,7 @@ read_color_mode_block (PSDimage *img_a,
|
|||
GInputStream *input,
|
||||
GError **error)
|
||||
{
|
||||
guint64 block_len;
|
||||
guint64 block_len = 0;
|
||||
guint64 block_start;
|
||||
guint64 block_end;
|
||||
|
||||
|
@ -237,7 +237,7 @@ read_image_resource_block (PSDimage *img_a,
|
|||
GInputStream *input,
|
||||
GError **error)
|
||||
{
|
||||
guint64 block_len;
|
||||
guint64 block_len = 0;
|
||||
guint64 block_end;
|
||||
|
||||
if (psd_read (input, &block_len, 4, error) < 4)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue