Bug 818611: Move declaration of "GSource* gs" to beginning of code block, to fix build warning in gtk2xtbin.c. r=karlt
authorDaniel Holbert <dholbert@cs.stanford.edu>
Wed, 05 Dec 2012 21:05:42 -0800
changeset 115183 326520e2222201cb01deed2b4b66adefb1f8b68a
parent 115182 0acd2e86ec47de483794d21360680911edecd52f
child 115184 a16704573ef7215df3b21a865e1e1c4787d1e782
push id23991
push useremorley@mozilla.com
push dateFri, 07 Dec 2012 14:14:29 +0000
treeherdermozilla-central@8432562db685 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskarlt
bugs818611
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 818611: Move declaration of "GSource* gs" to beginning of code block, to fix build warning in gtk2xtbin.c. r=karlt
widget/gtkxtbin/gtk2xtbin.c
--- a/widget/gtkxtbin/gtk2xtbin.c
+++ b/widget/gtkxtbin/gtk2xtbin.c
@@ -459,32 +459,33 @@ xt_client_init( XtClient * xtclient,
 }
 
 void
 xt_client_xloop_create(void)
 {
   /* If this is the first running widget, hook this display into the
      mainloop */
   if (0 == num_widgets) {
-    int           cnumber;
+    int cnumber;
+    GSource* gs;
 
     /* Set up xtdisplay in case we're missing one */
     if (!xtdisplay) {
       (void)xt_client_get_display();
     }
 
     /*
      * hook Xt event loop into the glib event loop.
      */
     /* the assumption is that gtk_init has already been called */
-    GSource* gs = g_source_new(&xt_event_funcs, sizeof(GSource));
-      if (!gs) {
-       return;
-      }
-    
+    gs = g_source_new(&xt_event_funcs, sizeof(GSource));
+    if (!gs) {
+      return;
+    }
+
     g_source_set_priority(gs, GDK_PRIORITY_EVENTS);
     g_source_set_can_recurse(gs, TRUE);
     tag = g_source_attach(gs, (GMainContext*)NULL);
 #ifdef VMS
     cnumber = XConnectionNumber(xtdisplay);
 #else
     cnumber = ConnectionNumber(xtdisplay);
 #endif