Opened 10 years ago

Closed 10 years ago

#4467 closed defect (fixed)

Silence -Wformat warning in libavformat/mov.c

Reported by: Jeremy Huddleston Owned by:
Priority: minor Component: avformat
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

You should probably cast that to uint8_t.

src/libavformat/mov.c:1230:59: warning: format specifies type 'unsigned char' but the argument has type 'enum AVColorRange' [-Wformat]
                    av_dlog(c, "color_range: %"PRIu8"\n", codec->color_range);
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
src/libavutil/log.h:322:71: note: expanded from macro 'av_dlog'
#    define av_dlog(pctx, ...) do { if (0) av_log(pctx, AV_LOG_DEBUG, __VA_ARGS__); } while (0)
                                                                      ^
1 warning generated.

Change History (2)

comment:1 by Carl Eugen Hoyos, 10 years ago

Version: unspecifiedgit-master

Does replacing %"PRIu8" with %d help?

comment:2 by Timothy Gu, 10 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.