diff mbox series

[RFC,3/3] make: Add -Werror-implicit-function-declaration for all targets

Message ID 20190411233115.32744-4-pvorel@suse.cz
State Changes Requested
Delegated to: Petr Vorel
Headers show
Series Android fixes and -Werror-implicit-function-declaration as default | expand

Commit Message

Petr Vorel April 11, 2019, 11:31 p.m. UTC
Previously it was passed only to Android build, but it's good to check
it for all.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Tested in travis:
https://travis-ci.org/pevik/ltp/builds/518886113
---
 include/mk/env_post.mk | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Petr Vorel July 12, 2019, 1:48 p.m. UTC | #1
Hi,

> Previously it was passed only to Android build, but it's good to check
> it for all.

> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> Tested in travis:
> https://travis-ci.org/pevik/ltp/builds/518886113
> ---
>  include/mk/env_post.mk | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)

> diff --git a/include/mk/env_post.mk b/include/mk/env_post.mk
> index 913bdf5d1..3ffdd0b7f 100644
> --- a/include/mk/env_post.mk
> +++ b/include/mk/env_post.mk
> @@ -41,11 +41,9 @@ ifeq ($(UCLINUX),1)
>  CPPFLAGS			+= -D__UCLIBC__ -DUCLINUX
>  endif

> -ifeq ($(ANDROID),1)
> -# There are many undeclared functions, it's best not to accidentally overlook
> -# them.
>  CFLAGS				+= -Werror-implicit-function-declaration

> +ifeq ($(ANDROID),1)
>  LDFLAGS				+= -L$(top_builddir)/lib/android_libpthread
>  LDFLAGS				+= -L$(top_builddir)/lib/android_librt
>  endif

Ping, please. Drop it or merge?

Kind regards,
Petr
Cyril Hrubis Aug. 2, 2019, 1:03 p.m. UTC | #2
Hi!
> > diff --git a/include/mk/env_post.mk b/include/mk/env_post.mk
> > index 913bdf5d1..3ffdd0b7f 100644
> > --- a/include/mk/env_post.mk
> > +++ b/include/mk/env_post.mk
> > @@ -41,11 +41,9 @@ ifeq ($(UCLINUX),1)
> >  CPPFLAGS			+= -D__UCLIBC__ -DUCLINUX
> >  endif
> 
> > -ifeq ($(ANDROID),1)
> > -# There are many undeclared functions, it's best not to accidentally overlook
> > -# them.
> >  CFLAGS				+= -Werror-implicit-function-declaration
> 
> > +ifeq ($(ANDROID),1)
> >  LDFLAGS				+= -L$(top_builddir)/lib/android_libpthread
> >  LDFLAGS				+= -L$(top_builddir)/lib/android_librt
> >  endif
> 
> Ping, please. Drop it or merge?

My opinion on Werror flags is that they should be on for development but
disabled for releases and production. The question is how to implement
something like this.

On the other hand we do have a CI so most problems would be caught
there...
Petr Vorel Aug. 2, 2019, 1:27 p.m. UTC | #3
Hi Cyril,

> Hi!
> > > diff --git a/include/mk/env_post.mk b/include/mk/env_post.mk
> > > index 913bdf5d1..3ffdd0b7f 100644
> > > --- a/include/mk/env_post.mk
> > > +++ b/include/mk/env_post.mk
> > > @@ -41,11 +41,9 @@ ifeq ($(UCLINUX),1)
> > >  CPPFLAGS			+= -D__UCLIBC__ -DUCLINUX
> > >  endif

> > > -ifeq ($(ANDROID),1)
> > > -# There are many undeclared functions, it's best not to accidentally overlook
> > > -# them.
> > >  CFLAGS				+= -Werror-implicit-function-declaration

> > > +ifeq ($(ANDROID),1)
> > >  LDFLAGS				+= -L$(top_builddir)/lib/android_libpthread
> > >  LDFLAGS				+= -L$(top_builddir)/lib/android_librt
> > >  endif

> > Ping, please. Drop it or merge?

> My opinion on Werror flags is that they should be on for development but
> disabled for releases and production. The question is how to implement
> something like this.

> On the other hand we do have a CI so most problems would be caught
> there...
Good point. I'll post a new patch remove it here and add it for travis.
It will be therefore disabled for Android, hope it's ok.

Kind regards,
Petr
diff mbox series

Patch

diff --git a/include/mk/env_post.mk b/include/mk/env_post.mk
index 913bdf5d1..3ffdd0b7f 100644
--- a/include/mk/env_post.mk
+++ b/include/mk/env_post.mk
@@ -41,11 +41,9 @@  ifeq ($(UCLINUX),1)
 CPPFLAGS			+= -D__UCLIBC__ -DUCLINUX
 endif
 
-ifeq ($(ANDROID),1)
-# There are many undeclared functions, it's best not to accidentally overlook
-# them.
 CFLAGS				+= -Werror-implicit-function-declaration
 
+ifeq ($(ANDROID),1)
 LDFLAGS				+= -L$(top_builddir)/lib/android_libpthread
 LDFLAGS				+= -L$(top_builddir)/lib/android_librt
 endif