From: Paul Eggert Date: Sat, 16 Apr 2011 21:22:40 +0000 (-0700) Subject: * lwlib-Xm.c (make_dialog): Rename local to avoid shadowing. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~268^2~15 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5c5e6a401e4a857aa8747111438797d88641dfef;p=emacs.git * lwlib-Xm.c (make_dialog): Rename local to avoid shadowing. (make_menu_in_widget): Add cast to avoid warning. --- diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog index 8476547ce61..fd9b10d243c 100644 --- a/lwlib/ChangeLog +++ b/lwlib/ChangeLog @@ -1,5 +1,8 @@ 2011-04-16 Paul Eggert + * lwlib-Xm.c (make_dialog): Rename local to avoid shadowing. + (make_menu_in_widget): Add cast to avoid warning. + * lwlib.c (EXPLAIN, destroy_one_instance): Avoid "else;". (first_child) [USE_MOTIF]: Protoize. diff --git a/lwlib/lwlib-Xm.c b/lwlib/lwlib-Xm.c index 55b27b9dab0..2b7677a02f5 100644 --- a/lwlib/lwlib-Xm.c +++ b/lwlib/lwlib-Xm.c @@ -511,7 +511,7 @@ make_menu_in_widget (widget_instance* instance, /* Allocate the children array */ for (num_children = 0, cur = val; cur; num_children++, cur = cur->next) ; - children = (Widget*)XtMalloc (num_children * sizeof (Widget)); + children = (Widget*)(void*)XtMalloc (num_children * sizeof (Widget)); /* WIDGET should be a RowColumn. */ if (!XmIsRowColumn (widget)) @@ -1020,10 +1020,10 @@ dialog_key_cb (Widget widget, { KeySym sym = 0; Modifiers modif_ret; - + XtTranslateKeycode (event->xkey.display, event->xkey.keycode, 0, &modif_ret, &sym); - + if (sym == osfXK_Cancel) { Widget w = *((Widget *) closure); @@ -1055,7 +1055,7 @@ make_dialog (char* name, Widget row; Widget icon; Widget icon_separator; - Widget message; + Widget message_label; Widget value = 0; Widget separator; Widget button = 0; @@ -1269,7 +1269,7 @@ make_dialog (char* name, XtSetArg(al[ac], XmNleftWidget, icon); ac++; XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++; XtSetArg(al[ac], XmNrightOffset, 13); ac++; - message = XmCreateLabel (form, "message", al, ac); + message_label = XmCreateLabel (form, "message", al, ac); if (list) XtManageChild (value); @@ -1281,7 +1281,7 @@ make_dialog (char* name, { children [i] = value; i++; } - children [i] = message; i++; + children [i] = message_label; i++; children [i] = icon; i++; children [i] = icon_separator; i++; XtManageChildren (children, i);