diff options
| author | Richard M. Stallman | 1995-04-07 19:02:49 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-04-07 19:02:49 +0000 |
| commit | 01d5e8928aadf0f5e03d40a6031625d704683ce2 (patch) | |
| tree | 95d4949d8786a00c1cc620b9c3f175ac92ca2d75 /src | |
| parent | a7bf3c5459094cb5d7141a5e99c938a57eaaa0c9 (diff) | |
| download | emacs-01d5e8928aadf0f5e03d40a6031625d704683ce2.tar.gz emacs-01d5e8928aadf0f5e03d40a6031625d704683ce2.zip | |
(menubar_selection_callback, dialog_selection_callback)
(single_submenu): Cast pointer to int by way of EMACS_INT.
Diffstat (limited to 'src')
| -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) | |||
| 1136 | else | 1136 | else |
| 1137 | { | 1137 | { |
| 1138 | entry = XVECTOR (vector)->contents[i + MENU_ITEMS_ITEM_VALUE]; | 1138 | entry = XVECTOR (vector)->contents[i + MENU_ITEMS_ITEM_VALUE]; |
| 1139 | if ((int) client_data == i) | 1139 | /* The EMACS_INT cast avoids a warning. There's no problem |
| 1140 | as long as pointers have enough bits to hold small integers. */ | ||
| 1141 | if ((int) (EMACS_INT) client_data == i) | ||
| 1140 | { | 1142 | { |
| 1141 | int j; | 1143 | int j; |
| 1142 | struct input_event buf; | 1144 | struct input_event buf; |
| @@ -1342,7 +1344,9 @@ single_submenu (item_key, item_name, maps) | |||
| 1342 | if (!NILP (descrip)) | 1344 | if (!NILP (descrip)) |
| 1343 | wv->key = (char *) XSTRING (descrip)->data; | 1345 | wv->key = (char *) XSTRING (descrip)->data; |
| 1344 | wv->value = 0; | 1346 | wv->value = 0; |
| 1345 | wv->call_data = (!NILP (def) ? (void *) i : 0); | 1347 | /* The EMACS_INT cast avoids a warning. There's no problem |
| 1348 | as long as pointers have enough bits to hold small integers. */ | ||
| 1349 | wv->call_data = (!NILP (def) ? (void *) (EMACS_INT) i : 0); | ||
| 1346 | wv->enabled = !NILP (enable); | 1350 | wv->enabled = !NILP (enable); |
| 1347 | prev_wv = wv; | 1351 | prev_wv = wv; |
| 1348 | 1352 | ||
| @@ -1864,7 +1868,9 @@ dialog_selection_callback (widget, id, client_data) | |||
| 1864 | LWLIB_ID id; | 1868 | LWLIB_ID id; |
| 1865 | XtPointer client_data; | 1869 | XtPointer client_data; |
| 1866 | { | 1870 | { |
| 1867 | if ((int)client_data != -1) | 1871 | /* The EMACS_INT cast avoids a warning. There's no problem |
| 1872 | as long as pointers have enough bits to hold small integers. */ | ||
| 1873 | if ((int) (EMACS_INT) client_data != -1) | ||
| 1868 | menu_item_selection = (Lisp_Object *) client_data; | 1874 | menu_item_selection = (Lisp_Object *) client_data; |
| 1869 | BLOCK_INPUT; | 1875 | BLOCK_INPUT; |
| 1870 | lw_destroy_all_widgets (id); | 1876 | lw_destroy_all_widgets (id); |