[pulseaudio-discuss] [PATCH 5/8] misc: Fix format specifiers
Peter Meerwald
pmeerw at pmeerw.net
Wed Aug 13 01:15:32 PDT 2014
to print a pa_usec_t, the format specifier to use is "%" PRIu64
modules/module-combine-sink.c: In function 'update_latency_range':
modules/module-combine-sink.c:750:5: warning: format '%lu' expects argument of type 'long unsigned int', but argument 6 has type 'pa_usec_t' [-Wformat]
modules/module-combine-sink.c:750:5: warning: format '%lu' expects argument of type 'long unsigned int', but argument 7 has type 'pa_usec_t' [-Wformat]
to print a size_t, use %zu
Signed-off-by: Peter Meerwald <pmeerw at pmeerw.net>
---
src/modules/module-combine-sink.c | 2 +-
src/tests/mcalign-test.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/modules/module-combine-sink.c b/src/modules/module-combine-sink.c
index 48f5621..9040314 100644
--- a/src/modules/module-combine-sink.c
+++ b/src/modules/module-combine-sink.c
@@ -747,7 +747,7 @@ static void update_latency_range(struct userdata *u) {
if (max_latency < min_latency)
max_latency = min_latency;
- pa_log_debug("Sink update latency range %lu %lu", min_latency, max_latency);
+ pa_log_debug("Sink update latency range %" PRIu64 " %" PRIu64, min_latency, max_latency);
pa_sink_set_latency_range_within_thread(u->sink, min_latency, max_latency);
}
diff --git a/src/tests/mcalign-test.c b/src/tests/mcalign-test.c
index bd192b5..443b4a7 100644
--- a/src/tests/mcalign-test.c
+++ b/src/tests/mcalign-test.c
@@ -74,7 +74,7 @@ int main(int argc, char *argv[]) {
c.length = (size_t) r;
pa_mcalign_push(a, &c);
- fprintf(stderr, "Read %ld bytes\n", (long)r);
+ fprintf(stderr, "Read %zd bytes\n", r);
c.index += (size_t) r;
--
1.9.1
More information about the pulseaudio-discuss
mailing list