The attached patch should fix this and other misuses of va_list in drivel. However, I am not able to test it on an Alpha system myself.
Ben. -- Ben Hutchings I say we take off; nuke the site from orbit. It's the only way to be sure.
--- src/dialogs.c~ 2005-07-09 04:49:06.000000000 +0100 +++ src/dialogs.c 2006-03-06 14:24:07.000000000 +0000 @@ -81,21 +81,19 @@ static DrivelButtonVAList * dialog_grey_button_on_invalid (GtkWidget *button, GtkWidget *entry, ...) { - va_list *args; + va_list args; gint signal; GtkWidget *w; DrivelButtonVAList *bval; - args = g_new0 (va_list, 1); - - va_start (*args, entry); + va_start (args, entry); bval = g_new0 (DrivelButtonVAList, 1); bval->button = button; bval->entries = NULL; bval->signals = NULL; - for (w = entry; w; w = va_arg (*args, GtkWidget *)) + for (w = entry; w; w = va_arg (args, GtkWidget *)) { bval->entries = g_slist_prepend (bval->entries, w); signal = g_signal_connect (G_OBJECT (w), "changed", @@ -104,7 +102,7 @@ GINT_TO_POINTER (signal)); } - va_end (*args); + va_end (args); return bval; } --- src/xmlrpc.c~ 2005-06-19 06:15:20.000000000 +0100 +++ src/xmlrpc.c 2006-03-06 14:42:59.000000000 +0000 @@ -32,7 +32,7 @@ /* Parse 'args' into an XML tree of appropriate values */ static void -parse_parameter_types (va_list *args, xmlNodePtr node) +parse_parameter_types (va_list args, xmlNodePtr node) { xmlNodePtr xml_param, xml_value; gchar *value; @@ -41,13 +41,12 @@ GTimeVal value_time; g_return_if_fail (node); - g_return_if_fail (*args); xml_param = NULL; xml_value = NULL; /* parse the parameters */ - while ((type = va_arg (*args, gint)) > -1) + while ((type = va_arg (args, gint)) > -1) { xml_param = xmlNewChild (node, NULL, "param", NULL); if (type != XMLRPC_TYPE_NODE) @@ -57,7 +56,7 @@ { case XMLRPC_TYPE_INT: { - value_int = va_arg (*args, gint); + value_int = va_arg (args, gint); value = g_strdup_printf ("%d", value_int); xmlNewTextChild (xml_value, NULL, "i4", value); g_free (value); @@ -65,7 +64,7 @@ } case XMLRPC_TYPE_BOOL: { - value_int = (gint)va_arg (*args, gboolean); + value_int = (gint)va_arg (args, gboolean); if (value_int) value = g_strdup ("1"); else @@ -76,13 +75,13 @@ } case XMLRPC_TYPE_STRING: { - value = va_arg (*args, gchar*); + value = va_arg (args, gchar*); xmlNewTextChild (xml_value, NULL, "string", value); break; } case XMLRPC_TYPE_DOUBLE: { - value_double = va_arg (*args, gdouble); + value_double = va_arg (args, gdouble); value = g_strdup_printf ("%f", value_double); xmlNewTextChild (xml_value, NULL, "double", value); g_free (value); @@ -91,7 +90,7 @@ case XMLRPC_TYPE_DATE: { value = g_new0 (gchar, 32); - value_time = va_arg (*args, GTimeVal); + value_time = va_arg (args, GTimeVal); strftime (value, 32, "%Y%m%dT%H:%M:%S", localtime (&value_time.tv_sec)); xmlNewTextChild (xml_value, NULL, "dateTime.iso8601", value); g_free (value); @@ -99,13 +98,13 @@ } case XMLRPC_TYPE_BASE64: { - value = va_arg (*args, gchar*); + value = va_arg (args, gchar*); xmlNewTextChild (xml_value, NULL, "base64", value); break; } case XMLRPC_TYPE_NODE: { - xml_value = va_arg (*args, xmlNodePtr); + xml_value = va_arg (args, xmlNodePtr); xmlAddChild (xml_param, xml_value); break; } @@ -117,8 +116,6 @@ } } - va_end (*args); - return; } @@ -214,7 +211,7 @@ gchar* xmlrpc_build_packet (const gchar *name, ...) { - va_list *args; + va_list args; xmlDocPtr doc; xmlNodePtr call, params; xmlChar *xml; @@ -227,10 +224,10 @@ xmlNewTextChild (call, NULL, "methodName", name); /* build the params node */ - args = g_new0 (va_list, 1); - va_start (*args, name); + va_start (args, name); params = xmlNewChild (call, NULL, "params", NULL); parse_parameter_types (args, params); + va_end (args); /* output the XML */ xmlDocDumpFormatMemoryEnc (doc, &xml, &bufsize, "UTF-8", 0);
signature.asc
Description: This is a digitally signed message part