Message ID | 1498540718-3224-1-git-send-email-thuth@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 27.06.2017 07:18, Thomas Huth wrote: > util.c should include util.h so that the compiler can check that > the prototype from the header matches the implementation. This is > required for compiling the file with "-Wmissing-prototypes". Why is something like that not contained in -Wextra? ;) > > Signed-off-by: Thomas Huth <thuth@redhat.com> > --- > lib/util.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/lib/util.c b/lib/util.c > index 69b1810..a905541 100644 > --- a/lib/util.c > +++ b/lib/util.c > @@ -4,6 +4,7 @@ > * This work is licensed under the terms of the GNU LGPL, version 2. > */ > #include <libcflat.h> > +#include "util.h" > > int parse_keyval(char *s, long *val) > { > Reviewed-by: David Hildenbrand <david@redhat.com>
On 27/06/2017 07:18, Thomas Huth wrote: > util.c should include util.h so that the compiler can check that > the prototype from the header matches the implementation. This is > required for compiling the file with "-Wmissing-prototypes". I think all of lib/ should compile with "-Wmissing-prototypes". I applied this patch. Paolo > Signed-off-by: Thomas Huth <thuth@redhat.com> > --- > lib/util.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/lib/util.c b/lib/util.c > index 69b1810..a905541 100644 > --- a/lib/util.c > +++ b/lib/util.c > @@ -4,6 +4,7 @@ > * This work is licensed under the terms of the GNU LGPL, version 2. > */ > #include <libcflat.h> > +#include "util.h" > > int parse_keyval(char *s, long *val) > { >
diff --git a/lib/util.c b/lib/util.c index 69b1810..a905541 100644 --- a/lib/util.c +++ b/lib/util.c @@ -4,6 +4,7 @@ * This work is licensed under the terms of the GNU LGPL, version 2. */ #include <libcflat.h> +#include "util.h" int parse_keyval(char *s, long *val) {
util.c should include util.h so that the compiler can check that the prototype from the header matches the implementation. This is required for compiling the file with "-Wmissing-prototypes". Signed-off-by: Thomas Huth <thuth@redhat.com> --- lib/util.c | 1 + 1 file changed, 1 insertion(+)