[libav-devel] [PATCH 3/6] Use correct printf conversion specifiers for unsigned types

Diego Biurrun diego at biurrun.de
Thu Dec 17 13:28:08 CET 2015


---
 libavcodec/fraps.c        | 2 +-
 libavcodec/txd.c          | 4 ++--
 libavformat/rtpdec_jpeg.c | 2 +-
 libavformat/rtpdec_xiph.c | 4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/libavcodec/fraps.c b/libavcodec/fraps.c
index eb61c70..c4ec23e 100644
--- a/libavcodec/fraps.c
+++ b/libavcodec/fraps.c
@@ -164,7 +164,7 @@ static int decode_frame(AVCodecContext *avctx,
 
     if (version > 5) {
         av_log(avctx, AV_LOG_ERROR,
-               "This file is encoded with Fraps version %d. " \
+               "This file is encoded with Fraps version %u. "
                "This codec can only decode versions <= 5.\n", version);
         return AVERROR_PATCHWELCOME;
     }
diff --git a/libavcodec/txd.c b/libavcodec/txd.c
index 463223c..ac46608 100644
--- a/libavcodec/txd.c
+++ b/libavcodec/txd.c
@@ -56,7 +56,7 @@ static int txd_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
     flags           = bytestream2_get_byte(&gb);
 
     if (version < 8 || version > 9) {
-        av_log(avctx, AV_LOG_ERROR, "texture data version %i is unsupported\n",
+        av_log(avctx, AV_LOG_ERROR, "texture data version %u is unsupported\n",
                                                                     version);
         return AVERROR_PATCHWELCOME;
     }
@@ -66,7 +66,7 @@ static int txd_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
     } else if (depth == 16 || depth == 32) {
         avctx->pix_fmt = AV_PIX_FMT_RGBA;
     } else {
-        av_log(avctx, AV_LOG_ERROR, "depth of %i is unsupported\n", depth);
+        av_log(avctx, AV_LOG_ERROR, "depth of %u is unsupported\n", depth);
         return AVERROR_PATCHWELCOME;
     }
 
diff --git a/libavformat/rtpdec_jpeg.c b/libavformat/rtpdec_jpeg.c
index 15324bf..6f741d1 100644
--- a/libavformat/rtpdec_jpeg.c
+++ b/libavformat/rtpdec_jpeg.c
@@ -229,7 +229,7 @@ static int jpeg_parse_packet(AVFormatContext *ctx, PayloadContext *jpeg,
     len -= 8;
 
     if (type > 1) {
-        av_log(ctx, AV_LOG_ERROR, "Unimplemented RTP/JPEG type %d\n", type);
+        av_log(ctx, AV_LOG_ERROR, "Unimplemented RTP/JPEG type %"PRIu8"\n", type);
         return AVERROR_PATCHWELCOME;
     }
 
diff --git a/libavformat/rtpdec_xiph.c b/libavformat/rtpdec_xiph.c
index c79cfeb..b3b1a7b 100644
--- a/libavformat/rtpdec_xiph.c
+++ b/libavformat/rtpdec_xiph.c
@@ -246,7 +246,7 @@ parse_packed_headers(const uint8_t * packed_headers,
 
     if (num_packed != 1 || num_headers > 3) {
         av_log(codec, AV_LOG_ERROR,
-               "Unimplemented number of headers: %d packed headers, %d headers\n",
+               "Unimplemented number of headers: %u packed headers, %u headers\n",
                num_packed, num_headers);
         return AVERROR_PATCHWELCOME;
     }
@@ -254,7 +254,7 @@ parse_packed_headers(const uint8_t * packed_headers,
     if (packed_headers_end - packed_headers != length ||
         length1 > length || length2 > length - length1) {
         av_log(codec, AV_LOG_ERROR,
-               "Bad packed header lengths (%d,%d,%td,%d)\n", length1,
+               "Bad packed header lengths (%u,%u,%td,%u)\n", length1,
                length2, packed_headers_end - packed_headers, length);
         return AVERROR_INVALIDDATA;
     }
-- 
2.5.0



More information about the libav-devel mailing list