+2007-11-11 Mathias Hasselmann <mathias@openismus.com>
+
+ Always exit with non-zero error code when printing warnings.
+
+ * gobject/glib-genmarshal.c: Add global exit_status variable, and use
+ it in pad() and process_signature() to return with non-zero error code
+ when printing warnings. (#495294)
+
2007-12-11 Rahul Bhalerao <b.rahul.pm@gmail.com>
* configure.in: Added entry for Marathi Translations
static gboolean gen_internal = FALSE;
static gboolean skip_ploc = FALSE;
static gboolean std_includes = TRUE;
+static gint exit_status = 0;
/* --- functions --- */
buffer = g_strdup_printf ("%s ", string);
g_warning ("overfull string (%u bytes) for padspace",
(guint) strlen (string));
+ exit_status |= 2;
return buffer;
}
if (!complete_out_arg (sig->rarg))
{
g_warning ("unknown type: %s", sig->rarg->keyword);
+ exit_status |= 1;
return;
}
for (node = sig->args; node; node = node->next)
if (!complete_in_arg (iarg))
{
g_warning ("unknown type: %s", iarg->keyword);
+ exit_status |= 1;
return;
}
}
GScanner *scanner;
GSList *slist, *files = NULL;
gint i;
- gint result = 0;
/* parse args and do fast exits */
parse_args (&argc, &argv);
if (fd < 0)
{
g_warning ("failed to open \"%s\": %s", file, g_strerror (errno));
- result = 1;
+ exit_status |= 1;
continue;
}
if (expected_token != G_TOKEN_NONE)
{
g_scanner_unexp_token (scanner, expected_token, "type name", NULL, NULL, NULL, TRUE);
- result = 1;
+ exit_status |= 1;
break;
}
g_hash_table_foreach_remove (marshallers, string_key_destroy, NULL);
g_hash_table_destroy (marshallers);
- return result;
+ return exit_status;
}
static void