Message ID | CAB0OVGrXQMXj=n-5zu63g8UDG78xL8AfzwM7hq2_==dNg6X7MQ@mail.gmail.com |
---|---|
State | Accepted |
Commit | b6fe10fa39bbbb2f186c3f2a4adefc3b387774ef |
Headers | show |
Series | [FFmpeg-devel] lavf/sga: Fix several format specifiers | expand |
Context | Check | Description |
---|---|---|
andriy/x86_make | success | Make finished |
andriy/x86_make_fate | success | Make fate finished |
andriy/PPC64_make | success | Make finished |
andriy/PPC64_make_fate | success | Make fate finished |
lgtm
On Thu, Mar 04, 2021 at 20:37:26 +0100, Carl Eugen Hoyos wrote: > attached patch fixes a few warnings when compiling for 32bit. > av_log(s, AV_LOG_DEBUG, "START %s\n", where); > - av_log(s, AV_LOG_DEBUG, "pos: %lX\n", avio_tell(s->pb)); > + av_log(s, AV_LOG_DEBUG, "pos: %"PRIX64"\n", avio_tell(s->pb)); #include <inttypes.h> Moritz
Am Do., 4. März 2021 um 22:23 Uhr schrieb Moritz Barsnick <barsnick@gmx.net>: > > On Thu, Mar 04, 2021 at 20:37:26 +0100, Carl Eugen Hoyos wrote: > > attached patch fixes a few warnings when compiling for 32bit. > > > av_log(s, AV_LOG_DEBUG, "START %s\n", where); > > - av_log(s, AV_LOG_DEBUG, "pos: %lX\n", avio_tell(s->pb)); > > + av_log(s, AV_LOG_DEBUG, "pos: %"PRIX64"\n", avio_tell(s->pb)); > > #include <inttypes.h> It is included through common.h - do we add it to every C file that would need it if common.h were not included? Carl Eugen
On Thu, Mar 04, 2021 at 22:47:57 +0100, Carl Eugen Hoyos wrote: > > #include <inttypes.h> > > It is included through common.h - do we add it to every C file > that would need it if common.h were not included? Okay, that's quite indirectly and implicitly via libavutil/internal.h. I don't know the policy on this. You're probably right. Moritz
Quoting Carl Eugen Hoyos (2021-03-04 22:47:57) > Am Do., 4. März 2021 um 22:23 Uhr schrieb Moritz Barsnick <barsnick@gmx.net>: > > > > On Thu, Mar 04, 2021 at 20:37:26 +0100, Carl Eugen Hoyos wrote: > > > attached patch fixes a few warnings when compiling for 32bit. > > > > > av_log(s, AV_LOG_DEBUG, "START %s\n", where); > > > - av_log(s, AV_LOG_DEBUG, "pos: %lX\n", avio_tell(s->pb)); > > > + av_log(s, AV_LOG_DEBUG, "pos: %"PRIX64"\n", avio_tell(s->pb)); > > > > #include <inttypes.h> > > It is included through common.h - do we add it to every C file > that would need it if common.h were not included? Yes, every file should explicitly include all the headers it directly uses. There was a recent discussion about this.
On Mon, Mar 8, 2021 at 9:22 AM Anton Khirnov <anton@khirnov.net> wrote: > Quoting Carl Eugen Hoyos (2021-03-04 22:47:57) > > Am Do., 4. März 2021 um 22:23 Uhr schrieb Moritz Barsnick < > barsnick@gmx.net>: > > > > > > On Thu, Mar 04, 2021 at 20:37:26 +0100, Carl Eugen Hoyos wrote: > > > > attached patch fixes a few warnings when compiling for 32bit. > > > > > > > av_log(s, AV_LOG_DEBUG, "START %s\n", where); > > > > - av_log(s, AV_LOG_DEBUG, "pos: %lX\n", avio_tell(s->pb)); > > > > + av_log(s, AV_LOG_DEBUG, "pos: %"PRIX64"\n", avio_tell(s->pb)); > > > > > > #include <inttypes.h> > > > > It is included through common.h - do we add it to every C file > > that would need it if common.h were not included? > > Yes, every file should explicitly include all the headers it directly > uses. There was a recent discussion about this. > That would make bunch of headers needed to be added to every single file. I do not remember such discussion ever take place. > -- > Anton Khirnov > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
diff --git a/libavformat/sga.c b/libavformat/sga.c index 20da423ebf..e7a41e91ea 100644 --- a/libavformat/sga.c +++ b/libavformat/sga.c @@ -232,11 +232,11 @@ static void print_stats(AVFormatContext *s, const char *where) SGADemuxContext *sga = s->priv_data; av_log(s, AV_LOG_DEBUG, "START %s\n", where); - av_log(s, AV_LOG_DEBUG, "pos: %lX\n", avio_tell(s->pb)); + av_log(s, AV_LOG_DEBUG, "pos: %"PRIX64"\n", avio_tell(s->pb)); av_log(s, AV_LOG_DEBUG, "idx: %X\n", sga->idx); av_log(s, AV_LOG_DEBUG, "packet_type: %X\n", sga->packet_type); av_log(s, AV_LOG_DEBUG, "payload_size: %X\n", sga->payload_size); - av_log(s, AV_LOG_DEBUG, "SECTOR: %016lX\n", AV_RB64(sga->sector)); + av_log(s, AV_LOG_DEBUG, "SECTOR: %016"PRIX64"\n", AV_RB64(sga->sector)); av_log(s, AV_LOG_DEBUG, "stream: %X\n", sga->sector[1]); av_log(s, AV_LOG_DEBUG, "END %s\n", where); } @@ -300,7 +300,7 @@ static int sga_video_packet(AVFormatContext *s, AVPacket *pkt) sga->flags = 0; update_type_size(s); - av_log(s, AV_LOG_DEBUG, "VIDEO PACKET: %d:%016lX i:%X\n", pkt->size, AV_RB64(sga->sector), sga->idx); + av_log(s, AV_LOG_DEBUG, "VIDEO PACKET: %d:%016"PRIX64" i:%X\n", pkt->size, AV_RB64(sga->sector), sga->idx); return 0; } @@ -347,7 +347,7 @@ static int sga_audio_packet(AVFormatContext *s, AVPacket *pkt) sga->flags = 0; update_type_size(s); - av_log(s, AV_LOG_DEBUG, "AUDIO PACKET: %d:%016lX i:%X\n", pkt->size, AV_RB64(sga->sector), sga->idx); + av_log(s, AV_LOG_DEBUG, "AUDIO PACKET: %d:%016"PRIX64" i:%X\n", pkt->size, AV_RB64(sga->sector), sga->idx); return 0; }