[PATCH 2/3] configure: check and use -Werror=empty-body
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(){ -- 1.7.9
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? This will make fate turn a violent shade of red at present. I would suggest waiting to hear back from Tomas, or anyone else, about the mxf change before applying this.
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 [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Asymptotically faster algorithms should always be preferred if you have asymptotical amounts of data
On 2014-04-04 00:57, Michael Niedermayer 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
Oh yes. I have seen some macros conditionally defined as nothing in a couple of places. I'll change this and send another patch if you don't beat me to it. I should also thank the one who told us the correct option.
Would have shown 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..28b7246 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 -Wempty-body enabled extra_warnings && check_cflags -Winline check_disable_warning(){ -- 1.7.9
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(){ -- 1.7.9
On 2014-04-04 01:18, James Darnley wrote:
Would have shown 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..28b7246 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 -Wempty-body enabled extra_warnings && check_cflags -Winline
check_disable_warning(){
Sorry ignore this one
On 2014-04-04 01:21, James Darnley wrote:
On 2014-04-04 01:18, James Darnley wrote:
Would have shown 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..28b7246 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 -Wempty-body enabled extra_warnings && check_cflags -Winline
check_disable_warning(){
Sorry ignore this one
Oh... wrong one. I'm sure you can work it out.
On Fri, Apr 04, 2014 at 01:18:02AM +0200, James Darnley wrote:
Would have shown 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(-)
applied thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Republics decline into democracies and democracies degenerate into despotisms. -- Aristotle
On 04.04.2014, at 00:57, Michael Niedermayer <michaelni@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)? Though I guess the compiler might consider that an empty body as well?
On Fri, Apr 04, 2014 at 07:26:59AM +0200, Reimar Döffinger wrote:
On 04.04.2014, at 00:57, Michael Niedermayer <michaelni@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
participants (3)
-
James Darnley -
Michael Niedermayer -
Reimar Döffinger