Commit 6f04d126 authored by Paul Eggert's avatar Paul Eggert
Browse files

Avoid 0 flag with %p printf format.

parent 4ef23ecf
......@@ -29,13 +29,14 @@
* 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.
Use pI instead of if-then-else-abort. Use %p to avoid casts,
avoiding the 0 flag, which is not portable.
* 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.
* xselect.c (x_queue_event): Use %p to avoid casts, avoiding 0 flag.
(x_stop_queuing_selection_requests): Likewise.
(x_get_window_property): Don't truncate byte count to an 'int'
when tracing.
......
......@@ -2004,7 +2004,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
case Lisp_Misc_Save_Value:
strout ("#<save_value ", -1, -1, printcharfun);
sprintf(buf, "ptr=%08p int=%d",
sprintf(buf, "ptr=%p int=%d",
XSAVE_VALUE (obj)->pointer,
XSAVE_VALUE (obj)->integer);
strout (buf, -1, -1, printcharfun);
......
......@@ -169,7 +169,7 @@ x_queue_event (struct input_event *event)
{
if (!memcmp (&queue_tmp->event, event, sizeof (*event)))
{
TRACE1 ("DECLINE DUP SELECTION EVENT %08p", queue_tmp);
TRACE1 ("DECLINE DUP SELECTION EVENT %p", queue_tmp);
x_decline_selection_request (event);
return;
}
......@@ -180,7 +180,7 @@ x_queue_event (struct input_event *event)
if (queue_tmp != NULL)
{
TRACE1 ("QUEUE SELECTION EVENT %08p", queue_tmp);
TRACE1 ("QUEUE SELECTION EVENT %p", queue_tmp);
queue_tmp->event = *event;
queue_tmp->next = selection_queue;
selection_queue = queue_tmp;
......@@ -213,7 +213,7 @@ x_stop_queuing_selection_requests (void)
while (selection_queue != NULL)
{
struct selection_event_queue *queue_tmp = selection_queue;
TRACE1 ("RESTORE SELECTION EVENT %08p", queue_tmp);
TRACE1 ("RESTORE SELECTION EVENT %p", queue_tmp);
kbd_buffer_unget_event (&queue_tmp->event);
selection_queue = queue_tmp->next;
xfree ((char *)queue_tmp);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment