Mark variables set but unused.
authorNelson Ferreira <nelson.ferreira@ieee.org>
Sun, 27 Sep 2015 21:35:16 +0000 (17:35 -0400)
committerNelson Ferreira <nelson.ferreira@ieee.org>
Sun, 6 Dec 2015 18:07:09 +0000 (13:07 -0500)
* src/lisp.h (PRIVATE_EXTERNAL_LIST_LOOP_6): Mark elt as unused.
(PRIVATE_EXTERNAL_ALIST_LOOP_8): Set elt_car and elt_cdr as unused.
* src/mule/mule-ccl.c (CCL_WRITE_STRING): Set bytes as unused.
* src/ui/X11/dialog-x.c (dbox_descriptor_to_widget_value): Set
title as unused.
* src/ui/X11/glyphs-x.c (x_widget_instantiate): Set nm as unused.
* src/ui/X11/gui-x.c (button_item_to_widget_value): Set intlen as
unused.
* src/ui/X11/objects-x.c (x_font_instance_properties): Set
name_len as unused.
* src/ui/lwlib/lwlib-Xlw.c (xlw_update_one_widget): Set mw as
unused.
* src/ui/lwlib/xlwtabs.c (TabsResize): Set tab as unused.

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
src/lisp.h
src/mule/mule-ccl.c
src/ui/X11/dialog-x.c
src/ui/X11/glyphs-x.c
src/ui/X11/gui-x.c
src/ui/X11/objects-x.c
src/ui/lwlib/lwlib-Xlw.c
src/ui/lwlib/xlwtabs.c

index e60bc14..ed698a8 100644 (file)
@@ -645,8 +645,7 @@ PRIVATE_EXTERNAL_LIST_LOOP_6 (elt, list, len, tail,                 \
             (CONSP (hare) ? ((elt = XCAR (hare)), 1) :                 \
              (NILP (hare) ? 0 :                                        \
               (signal_malformed_list_error (list), 0)));               \
             (CONSP (hare) ? ((elt = XCAR (hare)), 1) :                 \
              (NILP (hare) ? 0 :                                        \
               (signal_malformed_list_error (list), 0)));               \
-                                                                       \
-            (hare = XCDR (hare)),                                      \
+            (hare = XCDR (hare)), SXE_SET_UNUSED(elt),                 \
                     (void)((++len > suspicion_length) &&               \
                            ((void)(((len & 1) != 0)&&                  \
                                    ((tortoise = XCDR (tortoise)), 0)), \
                     (void)((++len > suspicion_length) &&               \
                            ((void)(((len & 1) != 0)&&                  \
                                    ((tortoise = XCDR (tortoise)), 0)), \
@@ -786,6 +785,7 @@ PRIVATE_EXTERNAL_ALIST_LOOP_8 (elt, elt_car, elt_cdr, list,         \
 
 #define PRIVATE_EXTERNAL_ALIST_LOOP_8(elt, elt_car, elt_cdr, list, len, \
                                      hare, tortoise, suspicion_length) \
 
 #define PRIVATE_EXTERNAL_ALIST_LOOP_8(elt, elt_car, elt_cdr, list, len, \
                                      hare, tortoise, suspicion_length) \
+SXE_SET_UNUSED(elt_car),SXE_SET_UNUSED(elt_cdr);                       \
 PRIVATE_EXTERNAL_LIST_LOOP_6 (elt, list, len, hare, tortoise,          \
                              suspicion_length)                         \
   if (CONSP (elt) ? (elt_car = XCAR (elt), elt_cdr = XCDR (elt), 0) :1)        \
 PRIVATE_EXTERNAL_LIST_LOOP_6 (elt, list, len, hare, tortoise,          \
                              suspicion_length)                         \
   if (CONSP (elt) ? (elt_car = XCAR (elt), elt_cdr = XCDR (elt), 0) :1)        \
index a158776..068883e 100644 (file)
@@ -809,6 +809,7 @@ static int stack_idx_of_map_multiple;
              }                                                 \
          }                                                     \
       }                                                                \
              }                                                 \
          }                                                     \
       }                                                                \
+      SXE_SET_UNUSED(bytes);                                    \
   } while (0)
 
 /* Read one byte from the current input buffer into Rth register.  */
   } while (0)
 
 /* Read one byte from the current input buffer into Rth register.  */
index dfcfa84..74267d0 100644 (file)
@@ -146,6 +146,8 @@ static widget_value *dbox_descriptor_to_widget_value(Lisp_Object keys)
                }
        }
 
                }
        }
 
+       SXE_SET_UNUSED(title);
+
        if (NILP(question))
                syntax_error("Dialog descriptor provides no question", keys);
 
        if (NILP(question))
                syntax_error("Dialog descriptor provides no question", keys);
 
index 1b30874..0bcf79e 100644 (file)
@@ -2364,7 +2364,7 @@ x_widget_instantiate(Lisp_Object image_instance, Lisp_Object instantiator,
        struct device *d = XDEVICE(device);
        Lisp_Object frame = DOMAIN_FRAME(domain);
        struct frame *f = XFRAME(frame);
        struct device *d = XDEVICE(device);
        Lisp_Object frame = DOMAIN_FRAME(domain);
        struct frame *f = XFRAME(frame);
-       char *nm = 0;
+       char *nm = 0;  // unused
        Widget wid;
        Arg al[32];
        int ac = 0;
        Widget wid;
        Arg al[32];
        int ac = 0;
@@ -2384,6 +2384,8 @@ x_widget_instantiate(Lisp_Object image_instance, Lisp_Object instantiator,
                LISP_STRING_TO_EXTERNAL(IMAGE_INSTANCE_WIDGET_TEXT(ii), nm,
                                        Qnative);
 
                LISP_STRING_TO_EXTERNAL(IMAGE_INSTANCE_WIDGET_TEXT(ii), nm,
                                        Qnative);
 
+       SXE_SET_UNUSED(nm);
+
        ii->data = xnew_and_zero(struct x_subwindow_data);
 
        /* Create a clip window to contain the subwidget. Incredibly the
        ii->data = xnew_and_zero(struct x_subwindow_data);
 
        /* Create a clip window to contain the subwidget. Incredibly the
index 33d1217..4e6db7f 100644 (file)
@@ -499,12 +499,16 @@ button_item_to_widget_value(Lisp_Object gui_object_instance,
        if (NILP(pgui->style)) {
                Bufbyte *intname = NULL;
                Bytecount intlen;
        if (NILP(pgui->style)) {
                Bufbyte *intname = NULL;
                Bytecount intlen;
+
                /* If the callback is nil, treat this item like unselectable text.
                   This way, dashes will show up as a separator. */
                if (!wv->enabled)
                        wv->type = BUTTON_TYPE;
                TO_INTERNAL_FORMAT(C_STRING, wv->name,
                                   ALLOCA, (intname, intlen), Qlwlib_encoding);
                /* If the callback is nil, treat this item like unselectable text.
                   This way, dashes will show up as a separator. */
                if (!wv->enabled)
                        wv->type = BUTTON_TYPE;
                TO_INTERNAL_FORMAT(C_STRING, wv->name,
                                   ALLOCA, (intname, intlen), Qlwlib_encoding);
+
+               SXE_SET_UNUSED(intlen);
+
                if (intname != NULL && separator_string_p(intname)) {
                        wv->type = SEPARATOR_TYPE;
                        wv->value =
                if (intname != NULL && separator_string_p(intname)) {
                        wv->type = SEPARATOR_TYPE;
                        wv->value =
index 2f17329..8348f19 100644 (file)
@@ -804,6 +804,8 @@ static Lisp_Object x_font_instance_properties(Lisp_Font_Instance * f)
                                           ALLOCA, (name_str, name_len),
                                           Qx_atom_name_encoding);
 
                                           ALLOCA, (name_str, name_len),
                                           Qx_atom_name_encoding);
 
+               SXE_SET_UNUSED(name_len);
+
                name = (name_str ? intern((char *)name_str) : Qnil);
                if (name_str &&
                    (atom == XA_FONT ||
                name = (name_str ? intern((char *)name_str) : Qnil);
                if (name_str &&
                    (atom == XA_FONT ||
index 9b98877..3174d55 100644 (file)
@@ -568,6 +568,9 @@ xlw_update_one_widget(widget_instance * instance, Widget widget,
                            composite.children[0];
                else
                        mw = (XlwMenuWidget) widget;
                            composite.children[0];
                else
                        mw = (XlwMenuWidget) widget;
+
+               SXE_SET_UNUSED(mw);
+
                XtSetArg(al[0], XtNmenu, val);
                XtSetValues(widget, al, 1);     /* #### mw unused! */
        }
                XtSetArg(al[0], XtNmenu, val);
                XtSetValues(widget, al, 1);     /* #### mw unused! */
        }
index bcafe58..ce5d2b1 100644 (file)
@@ -572,6 +572,7 @@ static void TabsResize(Widget w)
                                tab =
                                    (TabsConstraints) (*childP)->core.
                                    constraints;
                                tab =
                                    (TabsConstraints) (*childP)->core.
                                    constraints;
+                               SXE_SET_UNUSED(tab);
                                bw = (*childP)->core.border_width;
                                /* Don't do anything if we can't see any of the child. */
                                if (ch >= bw * 2 && ch > 0 && cw >= bw * 2
                                bw = (*childP)->core.border_width;
                                /* Don't do anything if we can't see any of the child. */
                                if (ch >= bw * 2 && ch > 0 && cw >= bw * 2