diff options
author | Richard M. Stallman <rms@gnu.org> | 1995-04-07 19:02:49 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1995-04-07 19:02:49 +0000 |
commit | d808aaeec5103f226d63c1c9fa49fccc8a349344 (patch) | |
tree | 3ee97e6aa5d43e2615fcb34251695cb096d80be8 /src/xmenu.c | |
parent | 5a7f47cc0c95c91e47d862956dd62a634a987ae8 (diff) | |
download | emacs-d808aaeec5103f226d63c1c9fa49fccc8a349344.tar.gz |
(menubar_selection_callback, dialog_selection_callback)
(single_submenu): Cast pointer to int by way of EMACS_INT.
Diffstat (limited to 'src/xmenu.c')
-rw-r--r-- | src/xmenu.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/xmenu.c b/src/xmenu.c index f6e593044ce..fd7c9a3cecb 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -1136,7 +1136,9 @@ menubar_selection_callback (widget, id, client_data) else { entry = XVECTOR (vector)->contents[i + MENU_ITEMS_ITEM_VALUE]; - if ((int) client_data == i) + /* The EMACS_INT cast avoids a warning. There's no problem + as long as pointers have enough bits to hold small integers. */ + if ((int) (EMACS_INT) client_data == i) { int j; struct input_event buf; @@ -1342,7 +1344,9 @@ single_submenu (item_key, item_name, maps) if (!NILP (descrip)) wv->key = (char *) XSTRING (descrip)->data; wv->value = 0; - wv->call_data = (!NILP (def) ? (void *) i : 0); + /* The EMACS_INT cast avoids a warning. There's no problem + as long as pointers have enough bits to hold small integers. */ + wv->call_data = (!NILP (def) ? (void *) (EMACS_INT) i : 0); wv->enabled = !NILP (enable); prev_wv = wv; @@ -1864,7 +1868,9 @@ dialog_selection_callback (widget, id, client_data) LWLIB_ID id; XtPointer client_data; { - if ((int)client_data != -1) + /* The EMACS_INT cast avoids a warning. There's no problem + as long as pointers have enough bits to hold small integers. */ + if ((int) (EMACS_INT) client_data != -1) menu_item_selection = (Lisp_Object *) client_data; BLOCK_INPUT; lw_destroy_all_widgets (id); |