[gegl] jp2-load: do not pass warning strings dirctly to printf function
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] jp2-load: do not pass warning strings dirctly to printf function
- Date: Sat, 19 Mar 2016 14:01:54 +0000 (UTC)
commit b7c4043742fe6f7eff83580f0c2dd3074f51a9ac
Author: Øyvind Kolås <pippin gimp org>
Date: Sat Mar 19 15:01:23 2016 +0100
jp2-load: do not pass warning strings dirctly to printf function
operations/external/jp2-load.c | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/operations/external/jp2-load.c b/operations/external/jp2-load.c
index 7e8e695..8d8f366 100644
--- a/operations/external/jp2-load.c
+++ b/operations/external/jp2-load.c
@@ -88,7 +88,7 @@ read_from_stream(GInputStream *stream,
NULL, &error);
if (read < 0)
{
- g_warning(error->message);
+ g_warning("%s", error->message);
g_error_free(error);
break;
}
@@ -128,21 +128,21 @@ query_jp2(GeglOperation *operation,
image_fmt = jas_image_getfmt (jasper);
if (image_fmt < 0)
{
- g_warning (_("Unknown JPEG 2000 image format"));
+ g_warning ("%s", _("Unknown JPEG 2000 image format"));
break;
}
image = jas_image_decode (jasper, image_fmt, NULL);
if (!image)
{
- g_warning (_("Unable to open JPEG 2000 image"));
+ g_warning ("%s", _("Unable to open JPEG 2000 image"));
break;
}
output_profile = jas_cmprof_createfromclrspc (JAS_CLRSPC_SRGB);
if (!output_profile)
{
- g_warning (_("Unable to create output color profile"));
+ g_warning ("%s", _("Unable to create output color profile"));
break;
}
@@ -150,7 +150,7 @@ query_jp2(GeglOperation *operation,
JAS_CMXFORM_INTENT_PER);
if (!p->image)
{
- g_warning (_("Unable to convert image to sRGB color space"));
+ g_warning ("%s", _("Unable to convert image to sRGB color space"));
break;
}
@@ -195,7 +195,7 @@ query_jp2(GeglOperation *operation,
(jas_image_cmptwidth (p->image, i) != p->width) ||
(jas_image_cmptheight (p->image, i) != p->height))
{
- g_warning (_("Components of JPEG 2000 input don't match"));
+ g_warning ("%s", _("Components of JPEG 2000 input don't match"));
b = TRUE;
break;
}
@@ -257,7 +257,7 @@ prepare (GeglOperation *operation)
jasper = jas_stream_memopen(NULL, -1);
if (jasper == NULL)
{
- g_warning(_("could not create a new Jasper stream"));
+ g_warning("%s", _("could not create a new Jasper stream"));
cleanup(operation);
return;
}
@@ -265,7 +265,7 @@ prepare (GeglOperation *operation)
stream = gegl_gio_open_input_stream(o->uri, o->path, &p->file, &error);
if (stream == NULL)
{
- g_warning(error->message);
+ g_warning("%s", error->message);
g_error_free(error);
cleanup(operation);
return;
@@ -290,7 +290,7 @@ prepare (GeglOperation *operation)
if (!query_jp2(operation, jasper))
{
- g_warning(_("could not query JPEG 2000 file"));
+ g_warning("%s", _("could not query JPEG 2000 file"));
cleanup(operation);
return;
}
@@ -346,7 +346,7 @@ process (GeglOperation *operation,
if ((components[0] < 0) || (components[1] < 0) || (components[2] < 0))
{
- g_warning (_("One or more of R, G, B components are missing"));
+ g_warning ("%s",_("One or more of R, G, B components are missing"));
break;
}
@@ -354,7 +354,7 @@ process (GeglOperation *operation,
jas_image_cmptsgnd (p->image, components[1]) ||
jas_image_cmptsgnd (p->image, components[2]))
{
- g_warning (_("One or more of R, G, B components have signed data"));
+ g_warning ("%s",_("One or more of R, G, B components have signed data"));
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]