Message ID | 20200320094113.883444-1-colin.king@canonical.com |
---|---|
State | Accepted |
Headers | show |
Series | [V2] Makfile: add more warning flags to ensure we catch more issues | expand |
On 2020-03-20 3:41 a.m., Colin King wrote: > From: Colin Ian King <colin.king@canonical.com> > > Increase the build warning checks to catch bad code. This builds > with gcc 9.3, gcc 10.0, clang 9 and clang 10 without issues. > > Signed-off-by: Colin Ian King <colin.king@canonical.com> > --- > > V2: remove -Wmissing-format-attribute, I'll try and get that sorted > for a later release. > > --- > src/Makefile.am | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/src/Makefile.am b/src/Makefile.am > index 904fc020..e0093aef 100644 > --- a/src/Makefile.am > +++ b/src/Makefile.am > @@ -15,7 +15,12 @@ AM_CPPFLAGS = \ > `pkg-config --silence-errors --cflags json-c` \ > -pthread `pkg-config --cflags glib-2.0 gio-2.0` \ > -Wall -Werror -Wextra \ > - -Wno-address-of-packed-member > + -Wno-address-of-packed-member \ > + -Wfloat-equal -Wmissing-declarations \ > + -Wno-long-long -Wredundant-decls -Wshadow \ > + -Wno-missing-field-initializers \ > + -Wno-missing-braces -Wno-sign-compare \ > + -Wno-multichar -Wcast-qual > > bin_PROGRAMS = fwts > > Acked-by: Alex Hung <alex.hung@canonical.com>
On 3/20/20 5:41 PM, Colin King wrote: > From: Colin Ian King <colin.king@canonical.com> > > Increase the build warning checks to catch bad code. This builds > with gcc 9.3, gcc 10.0, clang 9 and clang 10 without issues. > > Signed-off-by: Colin Ian King <colin.king@canonical.com> > --- > > V2: remove -Wmissing-format-attribute, I'll try and get that sorted > for a later release. > > --- > src/Makefile.am | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/src/Makefile.am b/src/Makefile.am > index 904fc020..e0093aef 100644 > --- a/src/Makefile.am > +++ b/src/Makefile.am > @@ -15,7 +15,12 @@ AM_CPPFLAGS = \ > `pkg-config --silence-errors --cflags json-c` \ > -pthread `pkg-config --cflags glib-2.0 gio-2.0` \ > -Wall -Werror -Wextra \ > - -Wno-address-of-packed-member > + -Wno-address-of-packed-member \ > + -Wfloat-equal -Wmissing-declarations \ > + -Wno-long-long -Wredundant-decls -Wshadow \ > + -Wno-missing-field-initializers \ > + -Wno-missing-braces -Wno-sign-compare \ > + -Wno-multichar -Wcast-qual > > bin_PROGRAMS = fwts > > Acked-by: Ivan Hu <ivan.hu@canonical.com>
diff --git a/src/Makefile.am b/src/Makefile.am index 904fc020..e0093aef 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -15,7 +15,12 @@ AM_CPPFLAGS = \ `pkg-config --silence-errors --cflags json-c` \ -pthread `pkg-config --cflags glib-2.0 gio-2.0` \ -Wall -Werror -Wextra \ - -Wno-address-of-packed-member + -Wno-address-of-packed-member \ + -Wfloat-equal -Wmissing-declarations \ + -Wno-long-long -Wredundant-decls -Wshadow \ + -Wno-missing-field-initializers \ + -Wno-missing-braces -Wno-sign-compare \ + -Wno-multichar -Wcast-qual bin_PROGRAMS = fwts