From 4da8cc062b94ec199349afee217421436727e835 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Wed, 18 Sep 2002 06:21:58 +0000 Subject: [PATCH] Fix for compiler warnings on PowerPC. Compiler complains about longjmp() clobbering local variables, which appear to... Original commit message from CVS: Fix for compiler warnings on PowerPC. Compiler complains about longjmp() clobbering local variables, which appear to be bogus. --- gst/schedulers/cothreads_compat.h | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/gst/schedulers/cothreads_compat.h b/gst/schedulers/cothreads_compat.h index c52211a6b7..bbbd5d5522 100644 --- a/gst/schedulers/cothreads_compat.h +++ b/gst/schedulers/cothreads_compat.h @@ -96,20 +96,21 @@ typedef cothread cothread_context; #define do_cothreads_stackquery(stack,size) \ cothreads_alloc_thread_stack (stack, size) -#define do_cothread_switch(to) G_STMT_START{ \ - cothread *from = cothread_self (); \ - if (from == (to)) { \ - GST_DEBUG (GST_CAT_COTHREAD_SWITCH, \ - "trying to switch to the same cothread (%p), not allowed", \ - (to)); \ - g_warning ("trying to switch to the same cothread, not allowed"); \ - } else { \ - GST_INFO (GST_CAT_COTHREAD_SWITCH, \ - "switching from cothread %p to cothread %p", from, (to)); \ - cothread_switch (from, (to)); \ - GST_INFO (GST_CAT_COTHREAD_SWITCH, "we're in cothread %p now", from); \ - } \ -}G_STMT_END +static void do_cothread_switch(cothread *to) +{ + cothread *from = cothread_self (); + if (from == (to)) { + GST_DEBUG (GST_CAT_COTHREAD_SWITCH, + "trying to switch to the same cothread (%p), not allowed", + (to)); + g_warning ("trying to switch to the same cothread, not allowed"); + } else { + GST_INFO (GST_CAT_COTHREAD_SWITCH, + "switching from cothread %p to cothread %p", from, (to)); + cothread_switch (from, (to)); + GST_INFO (GST_CAT_COTHREAD_SWITCH, "we're in cothread %p now", from); + } +} #define do_cothread_create(new_cothread, context, func, argc, argv) \ G_STMT_START{ \