r4118 - trunk/sfi
- From: stw svn gnome org
- To: svn-commits-list gnome org
- Subject: r4118 - trunk/sfi
- Date: Sun, 3 Dec 2006 07:51:16 -0500 (EST)
Author: stw
Date: 2006-12-03 07:51:13 -0500 (Sun, 03 Dec 2006)
New Revision: 4118
Modified:
trunk/sfi/ChangeLog
trunk/sfi/sfidl-cbase.cc
trunk/sfi/sfidl-clientcxx.cc
trunk/sfi/sfidl-corec.cc
trunk/sfi/sfidl-corecxx.cc
trunk/sfi/sfidl-hostc.cc
trunk/sfi/sfimemory.c
Log:
Sun Dec 3 13:47:31 2006 Stefan Westerfeld <stefan space twc de>
* sfidl-clientcxx.cc:
* sfidl-corec.cc:
* sfidl-hostc.cc:
* sfidl-corecxx.cc:
* sfidl-cbase.cc:
* sfimemory.c: Use "%zd" instead of "%d" when printing size_t
variables. This avoids printf compiler warnings on AMD64.
Modified: trunk/sfi/ChangeLog
===================================================================
--- trunk/sfi/ChangeLog 2006-12-03 09:41:35 UTC (rev 4117)
+++ trunk/sfi/ChangeLog 2006-12-03 12:51:13 UTC (rev 4118)
@@ -1,3 +1,13 @@
+Sun Dec 3 13:47:31 2006 Stefan Westerfeld <stefan space twc de>
+
+ * sfidl-clientcxx.cc:
+ * sfidl-corec.cc:
+ * sfidl-hostc.cc:
+ * sfidl-corecxx.cc:
+ * sfidl-cbase.cc:
+ * sfimemory.c: Use "%zd" instead of "%d" when printing size_t
+ variables. This avoids printf compiler warnings on AMD64.
+
Mon Nov 27 20:46:02 2006 Stefan Westerfeld <stefan space twc de>
* sfidl-parser.hh: Use Birnet::int64 instead of gint64 avoids printf
Modified: trunk/sfi/sfidl-cbase.cc
===================================================================
--- trunk/sfi/sfidl-cbase.cc 2006-12-03 09:41:35 UTC (rev 4117)
+++ trunk/sfi/sfidl-cbase.cc 2006-12-03 12:51:13 UTC (rev 4118)
@@ -614,13 +614,13 @@
ci->name = makeLowerName (ci->name, '-');
sort (components.begin(), components.end(), ::choiceReverseSort);
- printf("static const SfiConstants %s_vals[%d] = {\n",name.c_str(), ei->contents.size());
+ printf("static const SfiConstants %s_vals[%zd] = {\n",name.c_str(), ei->contents.size());
for (ci = components.begin(); ci != components.end(); ci++)
{
int value = ci->sequentialValue;
minval = min (value, minval);
maxval = max (value, maxval);
- printf(" { \"%s\", %d, %d },\n", ci->name.c_str(), ci->name.size(), value);
+ printf(" { \"%s\", %zd, %d },\n", ci->name.c_str(), ci->name.size(), value);
}
printf("};\n\n");
Modified: trunk/sfi/sfidl-clientcxx.cc
===================================================================
--- trunk/sfi/sfidl-clientcxx.cc 2006-12-03 09:41:35 UTC (rev 4117)
+++ trunk/sfi/sfidl-clientcxx.cc 2006-12-03 12:51:13 UTC (rev 4118)
@@ -199,7 +199,7 @@
printf ("static inline SfiChoiceValues\n");
printf ("%s_choice_values()\n", name.c_str());
printf ("{\n");
- printf (" static const SfiChoiceValue values[%u] = {\n", ci->contents.size());
+ printf (" static const SfiChoiceValue values[%zu] = {\n", ci->contents.size());
for (vector<ChoiceValue>::const_iterator vi = ci->contents.begin(); vi != ci->contents.end(); vi++)
printf (" { \"%s\", \"%s\" },\n", cUC_NAME (vi->name), vi->label.c_str()); // FIXME: i18n and blurb
printf (" };\n");
Modified: trunk/sfi/sfidl-corec.cc
===================================================================
--- trunk/sfi/sfidl-corec.cc 2006-12-03 09:41:35 UTC (rev 4117)
+++ trunk/sfi/sfidl-corec.cc 2006-12-03 12:51:13 UTC (rev 4118)
@@ -321,7 +321,7 @@
printf ("SfiChoiceValues\n");
printf ("%s_get_values (void)\n", makeLowerName (ei->name).c_str());
printf ("{\n");
- printf (" static SfiChoiceValue values[%u];\n", ei->contents.size());
+ printf (" static SfiChoiceValue values[%zu];\n", ei->contents.size());
printf (" static const SfiChoiceValues choice_values = {\n");
printf (" G_N_ELEMENTS (values), values,\n");
printf (" };\n");
@@ -541,8 +541,8 @@
string name = makeLowerName (ri->name);
- printf ("static GParamSpec *%s_field[%d];\n", name.c_str(), ri->contents.size());
- printf ("SfiRecFields %s_fields = { %d, %s_field };\n", name.c_str(), ri->contents.size(), name.c_str());
+ printf ("static GParamSpec *%s_field[%zd];\n", name.c_str(), ri->contents.size());
+ printf ("SfiRecFields %s_fields = { %zd, %s_field };\n", name.c_str(), ri->contents.size(), name.c_str());
string mname = makeMixedName (ri->name);
@@ -564,7 +564,7 @@
printInfoStrings (name + "_info_strings", ri->infos);
printf ("static SfiBoxedRecordInfo %s_boxed_info = {\n", name.c_str());
printf (" \"%s\",\n", mname.c_str());
- printf (" { %d, %s_field },\n", ri->contents.size(), name.c_str());
+ printf (" { %zd, %s_field },\n", ri->contents.size(), name.c_str());
printf (" %s_boxed2rec,\n", name.c_str());
printf (" %s_rec2boxed,\n", name.c_str());
printf (" %s_info_strings\n", name.c_str());
Modified: trunk/sfi/sfidl-corecxx.cc
===================================================================
--- trunk/sfi/sfidl-corecxx.cc 2006-12-03 09:41:35 UTC (rev 4117)
+++ trunk/sfi/sfidl-corecxx.cc 2006-12-03 12:51:13 UTC (rev 4118)
@@ -506,7 +506,7 @@
printf ("static SfiChoiceValues\n");
printf ("%s_choice_values()\n", name);
printf ("{\n");
- printf (" static SfiChoiceValue values[%u];\n", ci->contents.size());
+ printf (" static SfiChoiceValue values[%zu];\n", ci->contents.size());
printf (" static const SfiChoiceValues choice_values = {\n");
printf (" G_N_ELEMENTS (values), values,\n");
printf (" };\n");
@@ -566,7 +566,7 @@
continue;
nspace.setFromSymbol(ci->name);
// const char *name = nspace.printable_form (ci->name);
- printf ("BSE_CXX_DECLARE_ENUM (%s, \"%s\", %u,\n",
+ printf ("BSE_CXX_DECLARE_ENUM (%s, \"%s\", %zu,\n",
pure_TypeName (ci->name), make_PrefixedTypeName (ci->name), ci->contents.size());
for (vector<ChoiceValue>::const_iterator vi = ci->contents.begin(); vi != ci->contents.end(); vi++)
printf (" *v++ = ::Bse::EnumValue (%s, \"%s\", %s );\n",
@@ -704,8 +704,8 @@
printf (" static SfiRecFields rfields = { 0, NULL };\n");
printf (" if (!rfields.n_fields)\n");
printf (" {\n");
- printf (" static GParamSpec *fields[%u + 1];\n", ri->contents.size());
- printf (" rfields.n_fields = %u;\n", ri->contents.size());
+ printf (" static GParamSpec *fields[%zu + 1];\n", ri->contents.size());
+ printf (" rfields.n_fields = %zu;\n", ri->contents.size());
guint j = 0;
for (vector<Param>::const_iterator pi = ri->contents.begin(); pi != ri->contents.end(); pi++)
{
@@ -1105,7 +1105,7 @@
}
printf (")\n");
printf (" {\n");
- printf (" GValue args[1 + %u];\n", si->params.size());
+ printf (" GValue args[1 + %zu];\n", si->params.size());
printf (" args[0].g_type = 0, g_value_init (args + 0, %s);\n", make_TYPE_NAME (ci->name));
printf (" g_value_set_object (args + 0, gobject());\n");
guint i = 1;
@@ -1166,7 +1166,7 @@
{
const gchar *sig_name = canonify_name (si->name, '_');
const gchar *sig_string = canonify_name (si->name);
- printf (" static_data.signal_%s =\n klass->add_signal (\"%s\", (GSignalFlags) 0, %u",
+ printf (" static_data.signal_%s =\n klass->add_signal (\"%s\", (GSignalFlags) 0, %zu",
sig_name, sig_string, si->params.size());
for (vector<Param>::const_iterator ai = si->params.begin(); ai != si->params.end(); ai++)
printf (",\n %s", make_TYPE_NAME (ai->type));
Modified: trunk/sfi/sfidl-hostc.cc
===================================================================
--- trunk/sfi/sfidl-hostc.cc 2006-12-03 09:41:35 UTC (rev 4117)
+++ trunk/sfi/sfidl-hostc.cc 2006-12-03 12:51:13 UTC (rev 4118)
@@ -57,8 +57,8 @@
string name = makeLowerName (ri->name);
- printf("static GParamSpec *%s_field[%d];\n", name.c_str(), ri->contents.size());
- printf("SfiRecFields %s_fields = { %d, %s_field };\n", name.c_str(), ri->contents.size(), name.c_str());
+ printf("static GParamSpec *%s_field[%zd];\n", name.c_str(), ri->contents.size());
+ printf("SfiRecFields %s_fields = { %zd, %s_field };\n", name.c_str(), ri->contents.size(), name.c_str());
printf("\n");
}
for(vector<Sequence>::const_iterator si = parser.getSequences().begin(); si != parser.getSequences().end(); si++)
@@ -147,7 +147,7 @@
printf ("SfiChoiceValues\n");
printf ("%s_get_values (void)\n", makeLowerName (ei->name).c_str());
printf ("{\n");
- printf (" static SfiChoiceValue values[%u];\n", ei->contents.size());
+ printf (" static SfiChoiceValue values[%zu];\n", ei->contents.size());
printf (" static const SfiChoiceValues choice_values = {\n");
printf (" G_N_ELEMENTS (values), values,\n");
printf (" };\n");
Modified: trunk/sfi/sfimemory.c
===================================================================
--- trunk/sfi/sfimemory.c 2006-12-03 09:41:35 UTC (rev 4117)
+++ trunk/sfi/sfimemory.c 2006-12-03 12:51:13 UTC (rev 4118)
@@ -145,7 +145,7 @@
cmem -= DBG8_SIZE;
debug_size = (gsize*) cmem;
if (block_size != *debug_size)
- g_printerr ("%s: in memory block at (%p): block_size=%d != *debug_size=%d\n", G_STRLOC, mem, block_size, *debug_size);
+ g_printerr ("%s: in memory block at (%p): block_size=%zd != *debug_size=%zd\n", G_STRLOC, mem, block_size, *debug_size);
low_free (block_size + DBG8_SIZE, cmem);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]