diff mbox

[ndctl,4/4] configure: add -Wunused-result and -D_FORTIFY_SOURCE=2 to cflags

Message ID 20180503185050.7559-4-vishal.l.verma@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Verma, Vishal L May 3, 2018, 6:50 p.m. UTC
rpmbuild had these flags enabled, and reported a couple of errors that
local builds otherwise didn't. The errors hav now been fixed, and we
can enable these flags to catch future warnings and errors through
these flags.

Cc: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
---
 configure.ac | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Dan Williams May 3, 2018, 7:06 p.m. UTC | #1
On Thu, May 3, 2018 at 11:50 AM, Vishal Verma <vishal.l.verma@intel.com> wrote:
> rpmbuild had these flags enabled, and reported a couple of errors that
> local builds otherwise didn't. The errors hav now been fixed, and we

*have

> can enable these flags to catch future warnings and errors through
> these flags.
>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
> ---
>  configure.ac | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/configure.ac b/configure.ac
> index cddad16..6dbfcee 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -147,7 +147,9 @@ my_CFLAGS="\
>  -Wsign-compare \
>  -Wstrict-prototypes \
>  -Wtype-limits \
> --Wmaybe-uninitialized
> +-Wmaybe-uninitialized \
> +-Wunused-result \
> +-D_FORTIFY_SOURCE=2
>  "
>  AC_SUBST([my_CFLAGS])

Reviewed-by: Dan Williams <dan.j.williams@intel.com>
diff mbox

Patch

diff --git a/configure.ac b/configure.ac
index cddad16..6dbfcee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -147,7 +147,9 @@  my_CFLAGS="\
 -Wsign-compare \
 -Wstrict-prototypes \
 -Wtype-limits \
--Wmaybe-uninitialized
+-Wmaybe-uninitialized \
+-Wunused-result \
+-D_FORTIFY_SOURCE=2
 "
 AC_SUBST([my_CFLAGS])