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/dbusbind.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/dbusbind.c')
| -rw-r--r-- | src/dbusbind.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dbusbind.c b/src/dbusbind.c index 792414b23d8..4c0b9bd017a 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c | |||
| @@ -506,7 +506,7 @@ xd_append_arg (unsigned int dtype, Lisp_Object object, DBusMessageIter *iter) | |||
| 506 | CHECK_NUMBER (object); | 506 | CHECK_NUMBER (object); |
| 507 | { | 507 | { |
| 508 | dbus_uint64_t val = XUINT (object); | 508 | dbus_uint64_t val = XUINT (object); |
| 509 | XD_DEBUG_MESSAGE ("%c %u", dtype, (unsigned int) val); | 509 | XD_DEBUG_MESSAGE ("%c %"pI"u", dtype, XUINT (object)); |
| 510 | if (!dbus_message_iter_append_basic (iter, dtype, &val)) | 510 | if (!dbus_message_iter_append_basic (iter, dtype, &val)) |
| 511 | XD_SIGNAL2 (build_string ("Unable to append argument"), object); | 511 | XD_SIGNAL2 (build_string ("Unable to append argument"), object); |
| 512 | return; | 512 | return; |
| @@ -1377,7 +1377,7 @@ usage: (dbus-method-return-internal BUS SERIAL SERVICE &rest ARGS) */) | |||
| 1377 | CHECK_STRING (service); | 1377 | CHECK_STRING (service); |
| 1378 | GCPRO3 (bus, serial, service); | 1378 | GCPRO3 (bus, serial, service); |
| 1379 | 1379 | ||
| 1380 | XD_DEBUG_MESSAGE ("%lu %s ", (unsigned long) XUINT (serial), SDATA (service)); | 1380 | XD_DEBUG_MESSAGE ("%"pI"u %s ", XUINT (serial), SDATA (service)); |
| 1381 | 1381 | ||
| 1382 | /* Open a connection to the bus. */ | 1382 | /* Open a connection to the bus. */ |
| 1383 | connection = xd_initialize (bus, TRUE); | 1383 | connection = xd_initialize (bus, TRUE); |
| @@ -1465,7 +1465,7 @@ usage: (dbus-method-error-internal BUS SERIAL SERVICE &rest ARGS) */) | |||
| 1465 | CHECK_STRING (service); | 1465 | CHECK_STRING (service); |
| 1466 | GCPRO3 (bus, serial, service); | 1466 | GCPRO3 (bus, serial, service); |
| 1467 | 1467 | ||
| 1468 | XD_DEBUG_MESSAGE ("%lu %s ", (unsigned long) XUINT (serial), SDATA (service)); | 1468 | XD_DEBUG_MESSAGE ("%"pI"u %s ", XUINT (serial), SDATA (service)); |
| 1469 | 1469 | ||
| 1470 | /* Open a connection to the bus. */ | 1470 | /* Open a connection to the bus. */ |
| 1471 | connection = xd_initialize (bus, TRUE); | 1471 | connection = xd_initialize (bus, TRUE); |