diff options
| author | Paul Eggert | 2013-01-14 09:46:14 -0800 |
|---|---|---|
| committer | Paul Eggert | 2013-01-14 09:46:14 -0800 |
| commit | c50cf2eac4b18e38bef5b6e58827cc2bce1e98f4 (patch) | |
| tree | 56685b68573608bf284b55d0996cc471fda34366 /src | |
| parent | 57dd9e68862eeb452388b07c855a8112c3a7b22f (diff) | |
| download | emacs-c50cf2eac4b18e38bef5b6e58827cc2bce1e98f4.tar.gz emacs-c50cf2eac4b18e38bef5b6e58827cc2bce1e98f4.zip | |
Avoid needless casts with XSAVE_POINTER.
* alloc.c (mark_object) [GC_MARK_STACK]:
* dired.c (directory_files_internal_unwind):
* fileio.c (do_auto_save_unwind):
* gtkutil.c (pop_down_dialog):
* keymap.c (map_keymap_char_table_item):
* lread.c (load_unwind):
* nsmenu.m (pop_down_menu):
* print.c (print_object) [GC_MARK_STACK]:
* xfns.c (clean_up_file_dialog):
* xmenu.c (cleanup_widget_value_tree):
Omit casts between XSAVE_POINTER and a pointer type.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 15 | ||||
| -rw-r--r-- | src/alloc.c | 2 | ||||
| -rw-r--r-- | src/dired.c | 2 | ||||
| -rw-r--r-- | src/fileio.c | 2 | ||||
| -rw-r--r-- | src/gtkutil.c | 2 | ||||
| -rw-r--r-- | src/keymap.c | 3 | ||||
| -rw-r--r-- | src/lread.c | 2 | ||||
| -rw-r--r-- | src/nsmenu.m | 2 | ||||
| -rw-r--r-- | src/print.c | 2 | ||||
| -rw-r--r-- | src/xfns.c | 2 | ||||
| -rw-r--r-- | src/xmenu.c | 2 |
11 files changed, 25 insertions, 11 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 2445027edd5..80f5875ef16 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,18 @@ | |||
| 1 | 2013-01-14 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Avoid needless casts with XSAVE_POINTER. | ||
| 4 | * alloc.c (mark_object) [GC_MARK_STACK]: | ||
| 5 | * dired.c (directory_files_internal_unwind): | ||
| 6 | * fileio.c (do_auto_save_unwind): | ||
| 7 | * gtkutil.c (pop_down_dialog): | ||
| 8 | * keymap.c (map_keymap_char_table_item): | ||
| 9 | * lread.c (load_unwind): | ||
| 10 | * nsmenu.m (pop_down_menu): | ||
| 11 | * print.c (print_object) [GC_MARK_STACK]: | ||
| 12 | * xfns.c (clean_up_file_dialog): | ||
| 13 | * xmenu.c (cleanup_widget_value_tree): | ||
| 14 | Omit casts between XSAVE_POINTER and a pointer type. | ||
| 15 | |||
| 1 | 2013-01-14 Dmitry Antipov <dmantipov@yandex.ru> | 16 | 2013-01-14 Dmitry Antipov <dmantipov@yandex.ru> |
| 2 | 17 | ||
| 3 | Fix compilation with GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE. | 18 | Fix compilation with GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE. |
diff --git a/src/alloc.c b/src/alloc.c index c50bb0f32c7..3f1ccc82a58 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -5943,7 +5943,7 @@ mark_object (Lisp_Object arg) | |||
| 5943 | #if GC_MARK_STACK | 5943 | #if GC_MARK_STACK |
| 5944 | if (ptr->area) | 5944 | if (ptr->area) |
| 5945 | { | 5945 | { |
| 5946 | Lisp_Object *p = (Lisp_Object *) ptr->data[0].pointer; | 5946 | Lisp_Object *p = ptr->data[0].pointer; |
| 5947 | ptrdiff_t nelt; | 5947 | ptrdiff_t nelt; |
| 5948 | for (nelt = ptr->data[1].integer; nelt > 0; nelt--, p++) | 5948 | for (nelt = ptr->data[1].integer; nelt > 0; nelt--, p++) |
| 5949 | mark_maybe_object (*p); | 5949 | mark_maybe_object (*p); |
diff --git a/src/dired.c b/src/dired.c index 77e89c6e6b3..8483721401a 100644 --- a/src/dired.c +++ b/src/dired.c | |||
| @@ -78,7 +78,7 @@ directory_files_internal_w32_unwind (Lisp_Object arg) | |||
| 78 | static Lisp_Object | 78 | static Lisp_Object |
| 79 | directory_files_internal_unwind (Lisp_Object dh) | 79 | directory_files_internal_unwind (Lisp_Object dh) |
| 80 | { | 80 | { |
| 81 | DIR *d = (DIR *) XSAVE_POINTER (dh); | 81 | DIR *d = XSAVE_POINTER (dh); |
| 82 | block_input (); | 82 | block_input (); |
| 83 | closedir (d); | 83 | closedir (d); |
| 84 | unblock_input (); | 84 | unblock_input (); |
diff --git a/src/fileio.c b/src/fileio.c index 67b4b884bc0..d468576d639 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -5507,7 +5507,7 @@ static Lisp_Object | |||
| 5507 | do_auto_save_unwind (Lisp_Object arg) /* used as unwind-protect function */ | 5507 | do_auto_save_unwind (Lisp_Object arg) /* used as unwind-protect function */ |
| 5508 | 5508 | ||
| 5509 | { | 5509 | { |
| 5510 | FILE *stream = (FILE *) XSAVE_POINTER (arg); | 5510 | FILE *stream = XSAVE_POINTER (arg); |
| 5511 | auto_saving = 0; | 5511 | auto_saving = 0; |
| 5512 | if (stream != NULL) | 5512 | if (stream != NULL) |
| 5513 | { | 5513 | { |
diff --git a/src/gtkutil.c b/src/gtkutil.c index 3b1bbc73cff..259e0e971fd 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c | |||
| @@ -1650,7 +1650,7 @@ xg_dialog_response_cb (GtkDialog *w, | |||
| 1650 | static Lisp_Object | 1650 | static Lisp_Object |
| 1651 | pop_down_dialog (Lisp_Object arg) | 1651 | pop_down_dialog (Lisp_Object arg) |
| 1652 | { | 1652 | { |
| 1653 | struct xg_dialog_data *dd = (struct xg_dialog_data *) XSAVE_POINTER (arg); | 1653 | struct xg_dialog_data *dd = XSAVE_POINTER (arg); |
| 1654 | 1654 | ||
| 1655 | block_input (); | 1655 | block_input (); |
| 1656 | if (dd->w) gtk_widget_destroy (dd->w); | 1656 | if (dd->w) gtk_widget_destroy (dd->w); |
diff --git a/src/keymap.c b/src/keymap.c index 7b5aa45ebf3..82c9e980221 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -565,8 +565,7 @@ map_keymap_char_table_item (Lisp_Object args, Lisp_Object key, Lisp_Object val) | |||
| 565 | { | 565 | { |
| 566 | if (!NILP (val)) | 566 | if (!NILP (val)) |
| 567 | { | 567 | { |
| 568 | map_keymap_function_t fun | 568 | map_keymap_function_t fun = XSAVE_POINTER (XCAR (args)); |
| 569 | = (map_keymap_function_t) XSAVE_POINTER (XCAR (args)); | ||
| 570 | args = XCDR (args); | 569 | args = XCDR (args); |
| 571 | /* If the key is a range, make a copy since map_char_table modifies | 570 | /* If the key is a range, make a copy since map_char_table modifies |
| 572 | it in place. */ | 571 | it in place. */ |
diff --git a/src/lread.c b/src/lread.c index 35b61cbad4d..ced690a77b0 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -1357,7 +1357,7 @@ Return t if the file exists and loads successfully. */) | |||
| 1357 | static Lisp_Object | 1357 | static Lisp_Object |
| 1358 | load_unwind (Lisp_Object arg) /* Used as unwind-protect function in load. */ | 1358 | load_unwind (Lisp_Object arg) /* Used as unwind-protect function in load. */ |
| 1359 | { | 1359 | { |
| 1360 | FILE *stream = (FILE *) XSAVE_POINTER (arg); | 1360 | FILE *stream = XSAVE_POINTER (arg); |
| 1361 | if (stream != NULL) | 1361 | if (stream != NULL) |
| 1362 | { | 1362 | { |
| 1363 | block_input (); | 1363 | block_input (); |
diff --git a/src/nsmenu.m b/src/nsmenu.m index 4e81b3201c8..3e6fa54b047 100644 --- a/src/nsmenu.m +++ b/src/nsmenu.m | |||
| @@ -1347,7 +1347,7 @@ struct Popdown_data | |||
| 1347 | static Lisp_Object | 1347 | static Lisp_Object |
| 1348 | pop_down_menu (Lisp_Object arg) | 1348 | pop_down_menu (Lisp_Object arg) |
| 1349 | { | 1349 | { |
| 1350 | struct Popdown_data *unwind_data = (struct Popdown_data *) XSAVE_POINTER (arg); | 1350 | struct Popdown_data *unwind_data = XSAVE_POINTER (arg); |
| 1351 | 1351 | ||
| 1352 | block_input (); | 1352 | block_input (); |
| 1353 | if (popup_activated_flag) | 1353 | if (popup_activated_flag) |
diff --git a/src/print.c b/src/print.c index 0ae83cdf6d2..2d96202f389 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -2054,7 +2054,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 2054 | normal circumstances. */ | 2054 | normal circumstances. */ |
| 2055 | 2055 | ||
| 2056 | int limit = min (amount, 8); | 2056 | int limit = min (amount, 8); |
| 2057 | Lisp_Object *area = (Lisp_Object *) v->data[0].pointer; | 2057 | Lisp_Object *area = v->data[0].pointer; |
| 2058 | 2058 | ||
| 2059 | i = sprintf (buf, "with %"pD"d objects", amount); | 2059 | i = sprintf (buf, "with %"pD"d objects", amount); |
| 2060 | strout (buf, i, i, printcharfun); | 2060 | strout (buf, i, i, printcharfun); |
diff --git a/src/xfns.c b/src/xfns.c index 245ffae3573..fe99d36f9f4 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -5292,7 +5292,7 @@ file_dialog_unmap_cb (Widget widget, XtPointer client_data, XtPointer call_data) | |||
| 5292 | static Lisp_Object | 5292 | static Lisp_Object |
| 5293 | clean_up_file_dialog (Lisp_Object arg) | 5293 | clean_up_file_dialog (Lisp_Object arg) |
| 5294 | { | 5294 | { |
| 5295 | Widget dialog = (Widget) XSAVE_POINTER (arg); | 5295 | Widget dialog = XSAVE_POINTER (arg); |
| 5296 | 5296 | ||
| 5297 | /* Clean up. */ | 5297 | /* Clean up. */ |
| 5298 | block_input (); | 5298 | block_input (); |
diff --git a/src/xmenu.c b/src/xmenu.c index cbb5a3dc77e..6d880993d19 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -1610,7 +1610,7 @@ create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv, | |||
| 1610 | static Lisp_Object | 1610 | static Lisp_Object |
| 1611 | cleanup_widget_value_tree (Lisp_Object arg) | 1611 | cleanup_widget_value_tree (Lisp_Object arg) |
| 1612 | { | 1612 | { |
| 1613 | free_menubar_widget_value_tree ((widget_value *) XSAVE_POINTER (arg)); | 1613 | free_menubar_widget_value_tree (XSAVE_POINTER (arg)); |
| 1614 | return Qnil; | 1614 | return Qnil; |
| 1615 | } | 1615 | } |
| 1616 | 1616 | ||