treewide: Fix wrong formats on 32-bit

uint64_t evaluates to unsigned long long on 32-bit, not unsigned long.
Use the proper formats.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Rosen Penev 2019-11-19 20:28:54 -08:00 committed by Takashi Iwai
parent 5e6df5ae4b
commit 66e9a81609
2 changed files with 7 additions and 4 deletions

View file

@ -13,6 +13,7 @@
#include <errno.h> #include <errno.h>
#include <string.h> #include <string.h>
#include <fcntl.h> #include <fcntl.h>
#include <inttypes.h>
static const char *const cntr_type_labels[] = { static const char *const cntr_type_labels[] = {
[CONTAINER_TYPE_PARSER] = "parser", [CONTAINER_TYPE_PARSER] = "parser",
@ -356,10 +357,10 @@ int container_context_pre_process(struct container_context *cntr,
fprintf(stderr, " frames/second: %u\n", fprintf(stderr, " frames/second: %u\n",
cntr->frames_per_second); cntr->frames_per_second);
if (cntr->type == CONTAINER_TYPE_PARSER) { if (cntr->type == CONTAINER_TYPE_PARSER) {
fprintf(stderr, " frames: %lu\n", fprintf(stderr, " frames: %" PRIu64 "\n",
*frame_count); *frame_count);
} else { } else {
fprintf(stderr, " max frames: %lu\n", fprintf(stderr, " max frames: %" PRIu64 "\n",
*frame_count); *frame_count);
} }
} }
@ -427,7 +428,7 @@ int container_context_post_process(struct container_context *cntr,
assert(frame_count); assert(frame_count);
if (cntr->verbose && cntr->handled_byte_count > 0) { if (cntr->verbose && cntr->handled_byte_count > 0) {
fprintf(stderr, " Handled bytes: %lu\n", fprintf(stderr, " Handled bytes: %" PRIu64 "\n",
cntr->handled_byte_count); cntr->handled_byte_count);
} }

View file

@ -11,6 +11,7 @@
#include "misc.h" #include "misc.h"
#include <signal.h> #include <signal.h>
#include <inttypes.h>
struct context { struct context {
struct xfer_context xfer; struct xfer_context xfer;
@ -389,7 +390,8 @@ static int context_process_frames(struct context *ctx,
if (!ctx->xfer.quiet) { if (!ctx->xfer.quiet) {
fprintf(stderr, fprintf(stderr,
"%s: Expected %lu frames, Actual %lu frames\n", "%s: Expected %" PRIu64 "frames, "
"Actual %" PRIu64 "frames\n",
snd_pcm_stream_name(direction), expected_frame_count, snd_pcm_stream_name(direction), expected_frame_count,
*actual_frame_count); *actual_frame_count);
if (ctx->interrupted) { if (ctx->interrupted) {