Skip to content

Commit 8e89295

Browse files
committed
dispatch: adjust the print specifies to avoid some warnings (NFCI)
This adjusts the dispatch debug logging to use to `%llx` for the conversion of some values. This avoids a format conversion warning on Windows.
1 parent 4981dfd commit 8e89295

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/event/event.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -760,9 +760,9 @@ _dispatch_timer_heap_update(dispatch_timer_heap_t dth,
760760
#pragma mark timer unote
761761

762762
#define _dispatch_timer_du_debug(what, du) \
763-
_dispatch_debug("kevent-source[%p]: %s kevent[%p] { ident = 0x%x }", \
763+
_dispatch_debug("kevent-source[%p]: %s kevent[%p] { ident = 0x%llx }", \
764764
_dispatch_wref2ptr((du)->du_owner_wref), what, \
765-
(du), (du)->du_ident)
765+
(du), (unsigned long long)(du)->du_ident)
766766

767767
DISPATCH_ALWAYS_INLINE
768768
static inline unsigned int

src/source.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1449,11 +1449,11 @@ _dispatch_source_debug_attr(dispatch_source_t ds, char* buf, size_t bufsiz)
14491449
dispatch_source_refs_t dr = ds->ds_refs;
14501450
dispatch_queue_flags_t dqf = _dispatch_queue_atomic_flags(ds);
14511451
dispatch_unote_state_t du_state = _dispatch_unote_state(dr);
1452-
return dsnprintf(buf, bufsiz, "target = %s[%p], ident = 0x%x, "
1452+
return dsnprintf(buf, bufsiz, "target = %s[%p], ident = 0x%llx, "
14531453
"mask = 0x%x, pending_data = 0x%llx, registered = %d, "
14541454
"armed = %d, %s%s%s",
14551455
target && target->dq_label ? target->dq_label : "", target,
1456-
dr->du_ident, dr->du_fflags, (unsigned long long)dr->ds_pending_data,
1456+
(unsigned long long)dr->du_ident, dr->du_fflags, (unsigned long long)dr->ds_pending_data,
14571457
_du_state_registered(du_state), _du_state_armed(du_state),
14581458
(dqf & DSF_CANCELED) ? "cancelled, " : "",
14591459
(dqf & DSF_NEEDS_EVENT) ? "needs-event, " : "",

0 commit comments

Comments
 (0)