[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#508114: jack-a-c-k: Patch not a total fix

* Asheesh Laroia | 2008-12-13 06:59:46 [-0800]:

> Hi.

> Is it adequate, do you think, to test if &ap == NULL?  I am falling asleep 
> so take it as a senseless suggestion.
This is not what you want. You should not access va_list directly, you
have to use helpers like va_{start|end|arg|copy} to deal with them.
The code looks to me like the option variable can be ored with
"JackServerName JackLoadName JackLoadInit" to indicate what is in
va_list. Same like %s printf for instance.
So you should check for one of them IMHO. So in that case I was in the
wrong line an passing va_list to next function is valid (I was wondering
here a little...).

Please find attached an updated patch.

Subject: Fix build error on Alpha

ack-audio-connection-kit-0.115.6 does not build on Alpha due to abuse of
va_list [1]

|client.c: In function 'jack_client_open_aux':
|client.c:972: error: used struct type value where scalar is required
|client.c: In function 'jack_client_new':
|client.c:1120: error: incompatible type for argument 4 of 

va_list should not be touched directly unless helper functions are used.
Unfortunately only the alpha compiler complains.
This patch has been only compile tested on amd64 and it should address
the two compile errors in debian bug report #508114 [2].

Could upstream please verify the correctness of this patch?


[1] http://buildd.debian.org/fetch.cgi?pkg=jack-audio-connection-kit;ver=0.115.6-1;arch=alpha;stamp=1228082671/gcc
[2] http://bugs.debian.org/508114
--- a/libjack/client.c
+++ b/libjack/client.c
@@ -969,7 +969,7 @@ jack_client_open_aux (const char *client
 	/* parse variable arguments */
-	if (ap)
+	if (options & (JackServerName | JackLoadName | JackLoadInit))
         jack_varargs_parse(options, ap, &va);
@@ -1117,7 +1117,7 @@ jack_client_new (const char *client_name
 	jack_options_t options = JackUseExactName;
 	if (getenv("JACK_START_SERVER") == NULL)
 		options |= JackNoStartServer;
-	return jack_client_open_aux (client_name, options, NULL, NULL);
+	return jack_client_open(client_name, options, NULL);
 char *

Reply to: