[FFmpeg-devel] [PATCH 2/3] configure: check and use -Werror=empty-body

Michael Niedermayer michaelni at gmx.at
Fri Apr 4 15:55:35 CEST 2014


On Fri, Apr 04, 2014 at 07:26:59AM +0200, Reimar Döffinger wrote:
> On 04.04.2014, at 00:57, Michael Niedermayer <michaelni at gmx.at> wrote:
> > On Fri, Apr 04, 2014 at 12:53:55AM +0200, James Darnley wrote:
> >> On 2014-04-04 00:45, James Darnley wrote:
> >>> Would have caught the trailing semi-colon in lavu/log.c that broke detection of
> >>> 256 colour capable terminals.
> >>> ---
> >>> configure |    1 +
> >>> 1 files changed, 1 insertions(+), 0 deletions(-)
> >>> 
> >>> diff --git a/configure b/configure
> >>> index 46452ee..cb76890 100755
> >>> --- a/configure
> >>> +++ b/configure
> >>> @@ -4776,6 +4776,7 @@ check_cflags -Wundef
> >>> check_cflags -Wmissing-prototypes
> >>> check_cflags -Wno-pointer-to-int-cast
> >>> check_cflags -Wstrict-prototypes
> >>> +check_cflags -Werror=empty-body
> >>> enabled extra_warnings && check_cflags -Winline
> >>> 
> >>> check_disable_warning(){
> >>> 
> >> 
> >> Is it ever not an error?
> > 
> > it could be if the body disappears due to a macro
> 
> Isn't that kind of dangerous and shouldn't the macros rather replace with do { } while (0)?

maybe


> Though I guess the compiler might consider that an empty body as well?

i dunno

iam not objecting to try to add -Werror=...
if someone wants to try, just if it start breaking some cases it
either needs to be reverted or it needs some volunteer to
maintain / fix all cases

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Democracy is the form of government in which you can choose your dictator
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140404/fea6c65d/attachment.asc>


More information about the ffmpeg-devel mailing list