summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog5
-rw-r--r--src/print.c2
-rw-r--r--src/xselect.c6
3 files changed, 7 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 7d63e76c309..1ed289b3964 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -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.
diff --git a/src/print.c b/src/print.c
index d837a533818..2c9aa9dfd85 100644
--- a/src/print.c
+++ b/src/print.c
@@ -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);
diff --git a/src/xselect.c b/src/xselect.c
index 1141f2c6b68..db00649f24d 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -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);