From 1d71c1d9dea59dde3b7a868f427226fb61132dfb Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 30 Jun 2013 09:14:22 -0700 Subject: Fix minor problems found by static checking. * lwlib/lwlib-Xaw.h (xaw_update_one_value, xaw_popup_menu): * lwlib/lwlib-Xlw.h (xlw_update_one_value, xlw_pop_instance): * lwlib/lwlib.h (lw_allow_resizing, lw_set_main_areas) [!USE_MOTIF]: Now const. * src/widget.c (resize_cb): Remove unused local. --- lwlib/ChangeLog | 8 ++++++++ lwlib/lwlib-Xaw.h | 7 ++++--- lwlib/lwlib-Xlw.h | 7 ++++--- lwlib/lwlib.h | 6 ++++++ 4 files changed, 22 insertions(+), 6 deletions(-) (limited to 'lwlib') diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog index 02cc0063936..a9e424ac4b3 100644 --- a/lwlib/ChangeLog +++ b/lwlib/ChangeLog @@ -1,3 +1,11 @@ +2013-06-30 Paul Eggert + + Fix minor problems found by static checking. + * lwlib-Xaw.h (xaw_update_one_value, xaw_popup_menu): + * lwlib-Xlw.h (xlw_update_one_value, xlw_pop_instance): + * lwlib.h (lw_allow_resizing, lw_set_main_areas) [!USE_MOTIF]: + Now const. + 2012-10-06 Ulrich Müller * Makefile.in (AR, ARFLAGS): Get values from configure. diff --git a/lwlib/lwlib-Xaw.h b/lwlib/lwlib-Xaw.h index cf231270121..363334b575e 100644 --- a/lwlib/lwlib-Xaw.h +++ b/lwlib/lwlib-Xaw.h @@ -15,16 +15,17 @@ void xaw_update_one_widget (widget_instance *, Widget, widget_value *, Boolean); void -xaw_update_one_value (widget_instance *, Widget, widget_value *); +xaw_update_one_value (widget_instance *, Widget, widget_value *) + ATTRIBUTE_CONST; void xaw_destroy_instance (widget_instance *); void -xaw_popup_menu (Widget, XEvent *); +xaw_popup_menu (Widget, XEvent *) + ATTRIBUTE_CONST; void xaw_pop_instance (widget_instance *, Boolean); #endif /* LWLIB_XAW_H */ - diff --git a/lwlib/lwlib-Xlw.h b/lwlib/lwlib-Xlw.h index 3b2c301c3d3..2d38eb7be66 100644 --- a/lwlib/lwlib-Xlw.h +++ b/lwlib/lwlib-Xlw.h @@ -15,16 +15,17 @@ xlw_update_one_widget (widget_instance* instance, Widget widget, void xlw_update_one_value (widget_instance* instance, Widget widget, - widget_value* val); + widget_value* val) + ATTRIBUTE_CONST; void xlw_destroy_instance (widget_instance* instance); void -xlw_pop_instance (widget_instance* instance, Boolean up); +xlw_pop_instance (widget_instance* instance, Boolean up) + ATTRIBUTE_CONST; void xlw_popup_menu (Widget widget, XEvent * event); #endif /* LWLIB_XLW_H */ - diff --git a/lwlib/lwlib.h b/lwlib/lwlib.h index 2fccc7a4f42..849930c3d25 100644 --- a/lwlib/lwlib.h +++ b/lwlib/lwlib.h @@ -171,9 +171,15 @@ void lw_refigure_widget (Widget w, Boolean doit); Boolean lw_window_is_in_menubar (Window win, Widget menubar_widget); /* Manage resizing: TRUE permits resizing widget w; FALSE disallows it. */ +#ifndef USE_MOTIF +ATTRIBUTE_CONST +#endif void lw_allow_resizing (Widget w, Boolean flag); /* Set up the main window. */ +#ifndef USE_MOTIF +ATTRIBUTE_CONST +#endif void lw_set_main_areas (Widget parent, Widget menubar, Widget work_area); -- cgit v1.2.1