The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

a/util: Fix printf formatting on 32-bit

authored by

Ryan Pavlik and committed by
Jakob Bornecrantz
fd2c7c6a 44d67558

+11 -5
+6 -3
src/xrt/auxiliary/util/u_imu_sink_force_monotonic.c
··· 11 11 #include "util/u_trace_marker.h" 12 12 #include "util/u_logging.h" 13 13 14 + #include <inttypes.h> 14 15 15 16 /*! 16 17 * An @ref xrt_imu_sink splitter. ··· 34 35 struct u_imu_sink_force_monotonic *s = (struct u_imu_sink_force_monotonic *)xfs; 35 36 36 37 if (sample->timestamp_ns == s->last_ts) { 37 - U_LOG_W("Got an IMU sample with a duplicate timestamp! Old: %lu; New: %lu", s->last_ts, 38 + U_LOG_W("Got an IMU sample with a duplicate timestamp! Old: %" PRId64 "; New: %" PRId64 "", s->last_ts, 38 39 sample->timestamp_ns); 39 40 return; 40 - } else if (sample->timestamp_ns < s->last_ts) { 41 - U_LOG_W("Got an IMU sample with a non-monotonically-increasing timestamp! Old: %lu; New: %lu", 41 + } 42 + if (sample->timestamp_ns < s->last_ts) { 43 + U_LOG_W("Got an IMU sample with a non-monotonically-increasing timestamp! Old: %" PRId64 44 + "; New: %" PRId64 "", 42 45 s->last_ts, sample->timestamp_ns); 43 46 return; 44 47 }
+5 -2
src/xrt/auxiliary/util/u_sink_force_genlock.c
··· 16 16 17 17 #include <stdio.h> 18 18 #include <pthread.h> 19 + #include <inttypes.h> 19 20 20 21 21 22 /*! ··· 141 142 frames[1]->timestamp = ts; 142 143 143 144 if (ts == q->last_ts) { 144 - U_LOG_W("Got an image frame with a duplicate timestamp! Old: %lu; New: %lu", q->last_ts, ts); 145 + U_LOG_W("Got an image frame with a duplicate timestamp! Old: %" PRId64 "; New: %" PRId64, 146 + q->last_ts, ts); 145 147 } else if (ts < q->last_ts) { 146 - U_LOG_W("Got an image frame with a non-monotonically-increasing timestamp! Old: %lu; New: %lu", 148 + U_LOG_W("Got an image frame with a non-monotonically-increasing timestamp! Old: %" PRId64 149 + "; New: %" PRId64, 147 150 q->last_ts, ts); 148 151 } else { 149 152 // Send to the consumer, in left-right order.