b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame^] | 1 | From cb1e56cb691e0f9ebcad595632ef484389830431 Mon Sep 17 00:00:00 2001 |
| 2 | From: Mangix <mangixjohn@icloud.com> |
| 3 | Date: Thu, 27 Jun 2024 20:13:07 +0000 |
| 4 | Subject: [PATCH] minimad: fix format under 32-bit |
| 5 | |
| 6 | This is pointer subtraction. Use proper macro for this. 32-bit needs to be %d. |
| 7 | --- |
| 8 | minimad.c | 3 ++- |
| 9 | 1 file changed, 2 insertions(+), 1 deletion(-) |
| 10 | |
| 11 | --- a/minimad.c |
| 12 | +++ b/minimad.c |
| 13 | @@ -19,6 +19,7 @@ |
| 14 | * $Id: minimad.c,v 1.4 2004/01/23 09:41:32 rob Exp $ |
| 15 | */ |
| 16 | |
| 17 | +# include <inttypes.h> |
| 18 | # include <stdio.h> |
| 19 | # include <unistd.h> |
| 20 | # include <sys/stat.h> |
| 21 | @@ -174,7 +175,7 @@ enum mad_flow error(void *data, |
| 22 | { |
| 23 | struct buffer *buffer = data; |
| 24 | |
| 25 | - fprintf(stderr, "decoding error 0x%04x (%s) at byte offset %u\n", |
| 26 | + fprintf(stderr, "decoding error 0x%04x (%s) at byte offset %" PRIdPTR "\n", |
| 27 | stream->error, mad_stream_errorstr(stream), |
| 28 | stream->this_frame - buffer->start); |
| 29 | |