[gimp] plug-ins: don't use %ld to print simple integer values
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] plug-ins: don't use %ld to print simple integer values
- Date: Thu, 17 Mar 2011 14:59:35 +0000 (UTC)
commit ac5cd62af556e9b83596039c43d3395cf08621ea
Author: Michael Natterer <mitch gimp org>
Date: Thu Mar 17 15:58:46 2011 +0100
plug-ins: don't use %ld to print simple integer values
I have no clue why %ld was used here, the values are really small...
plug-ins/common/sphere-designer.c | 2 +-
plug-ins/gfig/gfig-style.c | 2 +-
plug-ins/lighting/lighting-ui.c | 8 ++++----
3 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/plug-ins/common/sphere-designer.c b/plug-ins/common/sphere-designer.c
index a6246a4..f9bf8ed 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 %%%lds", sizeof (endbuf) - 1);
+ snprintf (fmt_str, sizeof (fmt_str), "%%d %%d %%%ds", sizeof (endbuf) - 1);
while (!feof (f))
{
diff --git a/plug-ins/gfig/gfig-style.c b/plug-ins/gfig/gfig-style.c
index eae78f8..94ee0a6 100644
--- a/plug-ins/gfig/gfig-style.c
+++ b/plug-ins/gfig/gfig-style.c
@@ -172,7 +172,7 @@ 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), "%%%lds %%%lds %%%lds %%%lds",
+ snprintf (fmt_str, sizeof (fmt_str), "%%%ds %%%ds %%%ds %%%ds",
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 4480f49..73ac818 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: %%%lds %%%lds %%%lds",
+ " Position: %%%ds %%%ds %%%ds",
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: %%%lds %%%lds %%%lds",
+ " Direction: %%%ds %%%ds %%%ds",
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: %%%lds %%%lds %%%lds",
+ " Color: %%%ds %%%ds %%%ds",
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: %%%lds",
+ " Intensity: %%%ds",
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]