On Tue, 2010-04-20 at 15:58 +0900, Nobuhiro Iwamatsu wrote:
> Source: buzztard
> Version: 0.5.0-2
> Severity: serious
> 
> Hi,
> 
> your package FTBFS on armel, alpha and sh4.
>   https://buildd.debian.org/pkg.cgi?pkg=buzztard
> 
> Relevant part:
> [...]
> .libs/libbuzztard_core_la-processor-machine.o
> processor-machine.c: In function 'bt_processor_machine_persistence_load':
> processor-machine.c:150: error: incompatible type for argument 6 of
> 'parent_iface->load'
> processor-machine.c:150: note: expected 'va_list' but argument is of
> type 'void *'
> make[7]: *** [libbuzztard_core_la-processor-machine.lo] Error 1
> make[7]: Leaving directory
> `/build/buildd-buzztard_0.5.0-2-alpha-PLxAsg/buzztard-0.5.0/src/lib/core'
> make[6]: *** [all-recursive] Error 1
> -----

Thanks for reporting, does the attached patch fix it for you?


Stefan, is this the correct fix or will this break buzztard or do you
have a better idea how to fix this? :)
--- buzztard-0.5.0.orig/src/lib/core/processor-machine.c
+++ buzztard-0.5.0/src/lib/core/processor-machine.c
@@ -114,18 +114,24 @@ static BtPersistence *bt_processor_machi
   if(!persistence) {
     BtSong *song=NULL;
     gchar *param_name;
+    va_list var_args_copy;
+#ifdef __va_copy
+    __va_copy(var_args_copy, var_args);
+#else
+    var_args_copy = var_args;
+#endif
 
     // we need to get parameters from var_args (need to handle all baseclass params
-    param_name=va_arg(var_args,gchar*);
+    param_name=va_arg(var_args_copy,gchar*);
     while(param_name) {
       if(!strcmp(param_name,"song")) {
-        song=va_arg(var_args, gpointer);
+        song=va_arg(var_args_copy, gpointer);
       }
       else {
         GST_WARNING("unhandled argument: %s",param_name);
         break;
       }
-      param_name=va_arg(var_args,gchar*);
+      param_name=va_arg(var_args_copy,gchar*);
     }
     // @todo: we also need the parameters the parent-class would parse
     // as a a quick hack copied the code from the parent class into the subclasses
@@ -147,7 +153,7 @@ static BtPersistence *bt_processor_machi
   
   // load parent class stuff
   parent_iface=g_type_interface_peek_parent(BT_PERSISTENCE_GET_INTERFACE(result));
-  parent_iface->load(BT_TYPE_MACHINE,result,node,location,NULL,NULL);
+  parent_iface->load(BT_TYPE_MACHINE,result,node,location,NULL,var_args);
 
   return(result);
 }

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to