[FFmpeg-devel] [PATCH] avcodec/internal: silence -Wempty-body on clang
Michael Niedermayer
michaelni at gmx.at
Sun Sep 20 12:58:29 CEST 2015
On Sun, Sep 20, 2015 at 12:19:01PM +0200, Clément Bœsch wrote:
> On Sat, Sep 19, 2015 at 12:55:18AM -0400, Ganesh Ajjanagadde wrote:
> > This silences a -Wempty-body warning on clang 3.7+, e.g
> > http://fate.ffmpeg.org/log.cgi?time=20150918181527&log=compile&slot=x86_64-darwin-clang-polly-vectorize-stripmine-3.7.
> >
> > Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
> > ---
> > libavcodec/internal.h | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/libavcodec/internal.h b/libavcodec/internal.h
> > index 89f5aa2..fbee411 100644
> > --- a/libavcodec/internal.h
> > +++ b/libavcodec/internal.h
> > @@ -57,7 +57,7 @@
> > #ifdef TRACE
> > # define ff_tlog(ctx, ...) av_log(ctx, AV_LOG_TRACE, __VA_ARGS__)
> > #else
> > -# define ff_tlog(ctx, ...) while(0)
> > +# define ff_tlog(ctx, ...) while(0) {}
>
> I know this is already applied but you will probably want to use do {}
> while (0) so adding a ';' after the macro won't add an empty statement or
> break within a if/else form with no braces
fixed
thanks
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
What does censorship reveal? It reveals fear. -- Julian Assange
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150920/b3b40170/attachment.sig>
More information about the ffmpeg-devel
mailing list