aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-04-18 23:52:00 -0700
committerPaul Eggert2011-04-18 23:52:00 -0700
commit6f04d1261b5e973d67dd8f4da9f86559281b67be (patch)
treeb07f484f336e899e70852ff804cb9fa02acad267 /src
parent4ef23ecf04ac996a938f9fb0107efbc60fdc63e4 (diff)
downloademacs-6f04d1261b5e973d67dd8f4da9f86559281b67be.tar.gz
emacs-6f04d1261b5e973d67dd8f4da9f86559281b67be.zip
Avoid 0 flag with %p printf format.
Diffstat (limited to 'src')
-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 @@
29 * print.c (safe_debug_print, print_object): Likewise. 29 * print.c (safe_debug_print, print_object): Likewise.
30 (print_object): Don't overflow by converting EMACS_INT or EMACS_UINT 30 (print_object): Don't overflow by converting EMACS_INT or EMACS_UINT
31 to int. 31 to int.
32 Use pI instead of if-then-else-abort. Use %p to avoid casts. 32 Use pI instead of if-then-else-abort. Use %p to avoid casts,
33 avoiding the 0 flag, which is not portable.
33 * process.c (Fmake_network_process): Use pI to avoid cast. 34 * process.c (Fmake_network_process): Use pI to avoid cast.
34 * region-cache.c (pp_cache): Likewise. 35 * region-cache.c (pp_cache): Likewise.
35 * xdisp.c (decode_mode_spec): Likewise. 36 * xdisp.c (decode_mode_spec): Likewise.
36 * xrdb.c (x_load_resources) [USE_MOTIF]: Use pI to avoid undefined 37 * xrdb.c (x_load_resources) [USE_MOTIF]: Use pI to avoid undefined
37 behavior on 64-bit hosts with printf arg. 38 behavior on 64-bit hosts with printf arg.
38 * xselect.c (x_queue_event): Use %p to avoid casts. 39 * xselect.c (x_queue_event): Use %p to avoid casts, avoiding 0 flag.
39 (x_stop_queuing_selection_requests): Likewise. 40 (x_stop_queuing_selection_requests): Likewise.
40 (x_get_window_property): Don't truncate byte count to an 'int' 41 (x_get_window_property): Don't truncate byte count to an 'int'
41 when tracing. 42 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
2004 2004
2005 case Lisp_Misc_Save_Value: 2005 case Lisp_Misc_Save_Value:
2006 strout ("#<save_value ", -1, -1, printcharfun); 2006 strout ("#<save_value ", -1, -1, printcharfun);
2007 sprintf(buf, "ptr=%08p int=%d", 2007 sprintf(buf, "ptr=%p int=%d",
2008 XSAVE_VALUE (obj)->pointer, 2008 XSAVE_VALUE (obj)->pointer,
2009 XSAVE_VALUE (obj)->integer); 2009 XSAVE_VALUE (obj)->integer);
2010 strout (buf, -1, -1, printcharfun); 2010 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)
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 %08p", queue_tmp); 172 TRACE1 ("DECLINE DUP SELECTION EVENT %p", 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 %08p", queue_tmp); 183 TRACE1 ("QUEUE SELECTION EVENT %p", 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 %08p", queue_tmp); 216 TRACE1 ("RESTORE SELECTION EVENT %p", 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);