diff options
| author | Paul Eggert | 2011-04-18 17:34:42 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-04-18 17:34:42 -0700 |
| commit | c2982e87d382f0b5c00a65e63716c2b43d342881 (patch) | |
| tree | b8f155c52150e3cc85a26299812d139efd86231e /src/xselect.c | |
| parent | 5e073ec7384c432e42a8affeeb6d6906588f2af9 (diff) | |
| download | emacs-c2982e87d382f0b5c00a65e63716c2b43d342881.tar.gz emacs-c2982e87d382f0b5c00a65e63716c2b43d342881.zip | |
Replace pEd with more-general pI, and fix some printf arg casts.
* lisp.h (pI): New macro, generalizing old pEd macro to other
conversion specifiers. For example, use "...%"pI"d..." rather
than "...%"pEd"...".
(pEd): Remove. All uses replaced with similar uses of pI.
* src/m/amdx86-64.h, src/m/ia64.h, src/m/ibms390x.h: Likewise.
* alloc.c (check_pure_size): Don't overflow by converting size to int.
* bidi.c (bidi_dump_cached_states): Use pI to avoid cast.
* data.c (Fnumber_to_string): Use pI instead of if-then-else-abort.
* dbusbind.c (xd_append_arg): Use pI to avoid cast.
(Fdbus_method_return_internal, Fdbus_method_error_internal): Likewise.
* font.c (font_unparse_xlfd): Avoid potential buffer overrun on
64-bit hosts.
(font_unparse_xlfd, font_unparse_fcname): Use pI to avoid casts.
* keyboard.c (record_char, modify_event_symbol): Use pI to avoid casts.
* print.c (safe_debug_print, print_object): Likewise.
(print_object): Don't overflow by converting EMACS_INT or EMACS_UINT
to int.
Use pI instead of if-then-else-abort. Use %p to avoid casts.
* process.c (Fmake_network_process): Use pI to avoid cast.
* region-cache.c (pp_cache): Likewise.
* xdisp.c (decode_mode_spec): Likewise.
* xrdb.c (x_load_resources) [USE_MOTIF]: Use pI to avoid undefined
behavior on 64-bit hosts with printf arg.
* xselect.c (x_queue_event): Use %p to avoid casts.
(x_stop_queuing_selection_requests): Likewise.
(x_get_window_property): Don't truncate byte count to an 'int'
when tracing.
Diffstat (limited to 'src/xselect.c')
| -rw-r--r-- | src/xselect.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/xselect.c b/src/xselect.c index 2d656cfec9a..edf00226404 100644 --- a/src/xselect.c +++ b/src/xselect.c | |||
| @@ -169,7 +169,7 @@ x_queue_event (struct input_event *event) | |||
| 169 | { | 169 | { |
| 170 | if (!memcmp (&queue_tmp->event, event, sizeof (*event))) | 170 | if (!memcmp (&queue_tmp->event, event, sizeof (*event))) |
| 171 | { | 171 | { |
| 172 | TRACE1 ("DECLINE DUP SELECTION EVENT %08lx", (unsigned long)queue_tmp); | 172 | TRACE1 ("DECLINE DUP SELECTION EVENT %08p", queue_tmp); |
| 173 | x_decline_selection_request (event); | 173 | x_decline_selection_request (event); |
| 174 | return; | 174 | return; |
| 175 | } | 175 | } |
| @@ -180,7 +180,7 @@ x_queue_event (struct input_event *event) | |||
| 180 | 180 | ||
| 181 | if (queue_tmp != NULL) | 181 | if (queue_tmp != NULL) |
| 182 | { | 182 | { |
| 183 | TRACE1 ("QUEUE SELECTION EVENT %08lx", (unsigned long)queue_tmp); | 183 | TRACE1 ("QUEUE SELECTION EVENT %08p", queue_tmp); |
| 184 | queue_tmp->event = *event; | 184 | queue_tmp->event = *event; |
| 185 | queue_tmp->next = selection_queue; | 185 | queue_tmp->next = selection_queue; |
| 186 | selection_queue = queue_tmp; | 186 | selection_queue = queue_tmp; |
| @@ -213,7 +213,7 @@ x_stop_queuing_selection_requests (void) | |||
| 213 | while (selection_queue != NULL) | 213 | while (selection_queue != NULL) |
| 214 | { | 214 | { |
| 215 | struct selection_event_queue *queue_tmp = selection_queue; | 215 | struct selection_event_queue *queue_tmp = selection_queue; |
| 216 | TRACE1 ("RESTORE SELECTION EVENT %08lx", (unsigned long)queue_tmp); | 216 | TRACE1 ("RESTORE SELECTION EVENT %08p", queue_tmp); |
| 217 | kbd_buffer_unget_event (&queue_tmp->event); | 217 | kbd_buffer_unget_event (&queue_tmp->event); |
| 218 | selection_queue = queue_tmp->next; | 218 | selection_queue = queue_tmp->next; |
| 219 | xfree ((char *)queue_tmp); | 219 | xfree ((char *)queue_tmp); |
| @@ -1444,7 +1444,7 @@ x_get_window_property (Display *display, Window window, Atom property, | |||
| 1444 | while (bytes_remaining) | 1444 | while (bytes_remaining) |
| 1445 | { | 1445 | { |
| 1446 | #ifdef TRACE_SELECTION | 1446 | #ifdef TRACE_SELECTION |
| 1447 | int last = bytes_remaining; | 1447 | unsigned long last = bytes_remaining; |
| 1448 | #endif | 1448 | #endif |
| 1449 | result | 1449 | result |
| 1450 | = XGetWindowProperty (display, window, property, | 1450 | = XGetWindowProperty (display, window, property, |
| @@ -1454,7 +1454,7 @@ x_get_window_property (Display *display, Window window, Atom property, | |||
| 1454 | actual_type_ret, actual_format_ret, | 1454 | actual_type_ret, actual_format_ret, |
| 1455 | actual_size_ret, &bytes_remaining, &tmp_data); | 1455 | actual_size_ret, &bytes_remaining, &tmp_data); |
| 1456 | 1456 | ||
| 1457 | TRACE2 ("Read %ld bytes from property %s", | 1457 | TRACE2 ("Read %lu bytes from property %s", |
| 1458 | last - bytes_remaining, | 1458 | last - bytes_remaining, |
| 1459 | XGetAtomName (display, property)); | 1459 | XGetAtomName (display, property)); |
| 1460 | 1460 | ||