[PATCH v2 09/10] hw/dmx: Stop using variables for text widgets.

Cyril Brulebois kibi at debian.org
Thu Jun 2 18:00:44 PDT 2011


They are unused in the sense they're not getting any callback set up, so
there's no point in storing them into variables. Keep the initial
alignment of the parameters to try and reduce the diff noise.

Those warnings go away accordingly:
|   CC     xdmxconfig-xdmxconfig.o
| xdmxconfig.c: In function ‘main’:
| xdmxconfig.c:881:29: warning: variable ‘quittext’ set but not used [-Wunused-but-set-variable]
| xdmxconfig.c:880:53: warning: variable ‘abouttext’ set but not used [-Wunused-but-set-variable]

Signed-off-by: Cyril Brulebois <kibi at debian.org>
---
 hw/dmx/config/xdmxconfig.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/hw/dmx/config/xdmxconfig.c b/hw/dmx/config/xdmxconfig.c
index c67077a..2de7f2b 100644
--- a/hw/dmx/config/xdmxconfig.c
+++ b/hw/dmx/config/xdmxconfig.c
@@ -877,8 +877,8 @@ int main(int argc, char **argv)
     Widget         parent, menubox, bottombox, databox, canvasbox;
     Widget         filebutton, helpbutton;
     Widget         filemenu, openbutton, savebutton, quitbutton;
-    Widget         helpmenu, aboutbutton, aboutbox, abouttext, aboutok;
-    Widget         quitbox, quittext, quitok, quitcan;
+    Widget         helpmenu, aboutbutton, aboutbox, aboutok;
+    Widget         quitbox, quitok, quitcan;
     Widget         ncbutton;
     Widget         canbutton;
     Widget         ecbox, ecokbutton, eccanbutton;
@@ -1096,7 +1096,7 @@ int main(int argc, char **argv)
                                         toplevel, NULL);
     aboutbox     = XtVaCreateManagedWidget("aboutbox", boxWidgetClass,
                                            aboutpopup, NULL);
-    abouttext    = XtVaCreateManagedWidget("abouttext", labelWidgetClass,
+                   XtVaCreateManagedWidget("abouttext", labelWidgetClass,
                                            aboutbox,
                                            XtNlabel, DMX_INFO,
                                            NULL);
@@ -1108,7 +1108,7 @@ int main(int argc, char **argv)
                                         toplevel, NULL);
     quitbox      = XtVaCreateManagedWidget("quitbox", boxWidgetClass,
                                            quitpopup, NULL);
-    quittext     = XtVaCreateManagedWidget("quittext", labelWidgetClass,
+                   XtVaCreateManagedWidget("quittext", labelWidgetClass,
                                            quitbox,
                                            XtNlabel,
                                            "Changes to the configuration\n"
-- 
1.7.5.3



More information about the xorg-devel mailing list