[gimp] Fix size_t format modifier yet again
- From: Mukund Sivaraman <muks src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Fix size_t format modifier yet again
- Date: Thu, 24 Mar 2011 06:03:28 +0000 (UTC)
commit c0624324440f6d868f71d3a861421f140843b375
Author: Mukund Sivaraman <muks banu com>
Date: Thu Mar 24 11:29:23 2011 +0530
Fix size_t format modifier yet again
This is cause our favourite platform Windows doesn't support
the POSIX `z' modifier for size_t arguments. Yay!
plug-ins/common/sphere-designer.c | 2 +-
plug-ins/gfig/gfig-style.c | 6 +++++-
plug-ins/lighting/lighting-ui.c | 8 ++++----
3 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/plug-ins/common/sphere-designer.c b/plug-ins/common/sphere-designer.c
index 967f625..e975be4 100644
--- a/plug-ins/common/sphere-designer.c
+++ b/plug-ins/common/sphere-designer.c
@@ -2018,7 +2018,7 @@ loadit (const gchar * fn)
s.com.numtexture = 0;
- snprintf (fmt_str, sizeof (fmt_str), "%%d %%d %%%zus", sizeof (endbuf) - 1);
+ snprintf (fmt_str, sizeof (fmt_str), "%%d %%d %%%" G_GSIZE_FORMAT "s", sizeof (endbuf) - 1);
while (!feof (f))
{
diff --git a/plug-ins/gfig/gfig-style.c b/plug-ins/gfig/gfig-style.c
index fb9285c..82c2261 100644
--- a/plug-ins/gfig/gfig-style.c
+++ b/plug-ins/gfig/gfig-style.c
@@ -172,7 +172,11 @@ gfig_read_parameter_gimp_rgb (gchar **text,
style_entry->r = style_entry->g = style_entry->b = style_entry->a = 0.;
- snprintf (fmt_str, sizeof (fmt_str), "%%%zus %%%zus %%%zus %%%zus",
+ snprintf (fmt_str, sizeof (fmt_str),
+ "%%%" G_GSIZE_FORMAT "s"
+ " %%%" G_GSIZE_FORMAT "s"
+ " %%%" G_GSIZE_FORMAT "s"
+ " %%%" G_GSIZE_FORMAT "s",
sizeof (colorstr_r) - 1, sizeof (colorstr_g) - 1,
sizeof (colorstr_b) - 1, sizeof (colorstr_a) - 1);
diff --git a/plug-ins/lighting/lighting-ui.c b/plug-ins/lighting/lighting-ui.c
index 742eb62..114e1fd 100644
--- a/plug-ins/lighting/lighting-ui.c
+++ b/plug-ins/lighting/lighting-ui.c
@@ -1393,7 +1393,7 @@ load_preset_response (GtkFileChooser *chooser,
}
snprintf (fmt_str, sizeof (fmt_str),
- " Position: %%%zus %%%zus %%%zus",
+ " Position: %%%" G_GSIZE_FORMAT "s %%%" G_GSIZE_FORMAT "s %%%" G_GSIZE_FORMAT "s",
sizeof (buffer1) - 1,
sizeof (buffer2) - 1,
sizeof (buffer3) - 1);
@@ -1403,7 +1403,7 @@ load_preset_response (GtkFileChooser *chooser,
source->position.z = g_ascii_strtod (buffer3, &endptr);
snprintf (fmt_str, sizeof (fmt_str),
- " Direction: %%%zus %%%zus %%%zus",
+ " Direction: %%%" G_GSIZE_FORMAT "s %%%" G_GSIZE_FORMAT "s %%%" G_GSIZE_FORMAT "s",
sizeof (buffer1) - 1,
sizeof (buffer2) - 1,
sizeof (buffer3) - 1);
@@ -1413,7 +1413,7 @@ load_preset_response (GtkFileChooser *chooser,
source->direction.z = g_ascii_strtod (buffer3, &endptr);
snprintf (fmt_str, sizeof (fmt_str),
- " Color: %%%zus %%%zus %%%zus",
+ " Color: %%%" G_GSIZE_FORMAT "s %%%" G_GSIZE_FORMAT "s %%%" G_GSIZE_FORMAT "s",
sizeof (buffer1) - 1,
sizeof (buffer2) - 1,
sizeof (buffer3) - 1);
@@ -1424,7 +1424,7 @@ load_preset_response (GtkFileChooser *chooser,
source->color.a = 1.0;
snprintf (fmt_str, sizeof (fmt_str),
- " Intensity: %%%zus",
+ " Intensity: %%%" G_GSIZE_FORMAT "s",
sizeof (buffer1) - 1);
fscanf (fp, fmt_str, buffer1);
source->intensity = g_ascii_strtod (buffer1, &endptr);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]