On (10/01/14 13:38), Stef Walter wrote:
On 10.01.2014 10:26, Jakub Hrozek wrote:
> On Thu, Jan 09, 2014 at 09:26:40PM +0100, Stef Walter wrote:
>> diff --git a/configure.ac b/configure.ac
>> index f89de6e..9156dfa 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -325,7 +325,7 @@ SSS_WARNINGS='
>> for option in $SSS_WARNINGS; do
>> SAVE_CFLAGS="$CFLAGS"
>> CFLAGS="$CFLAGS $option"
>> - AC_MSG_CHECKING([whether compiler understands $option])
>> + AC_MSG_CHECKING([compiler option $option])
>
> Was this hunk intended to be part of patch #1 ?
Moved to first patch.
> I think there should be a default for "enable_strict". Othwerwise the
> configure output looks a bit odd when neither --enable-strict nor
> --disable-strict is selected:
Right ... removed the tristate, now it's just either on or off,
defaulting to off (at least for now).
In other projects I've used it as a tristate where --enable-strict turns
on strictness, and --disable-strict makes things more liberal than
default. But no need to get into that here.
Cheers,
Stef
From c181a90e8493a804b3ff1f5b3d1571cdf04d7681 Mon Sep 17 00:00:00
2001
From: Stef Walter <stefw(a)redhat.com>
Date: Thu, 9 Jan 2014 14:12:08 +0100
Subject: [PATCH 1/2] configure: Enable usual SSSD_WARNINGS automatically
Instead of limiting these to Fedora based sssd developers
via the bashrc_sssd script, enable them automatically in
configure if supported by the compiler.
---
configure.ac | 23 +++++++++++++++++++++++
contrib/fedora/bashrc_sssd | 12 ++----------
2 files changed, 25 insertions(+), 10 deletions(-)
diff --git a/configure.ac b/configure.ac
index 9303820..f66bf0b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -312,6 +312,29 @@ abs_build_dir=`pwd`
AC_DEFINE_UNQUOTED([ABS_BUILD_DIR], ["$abs_build_dir"], [Absolute path to the
build directory])
AC_SUBST([abs_builddir], $abs_build_dir)
+dnl Warnings -- after all other checks are done
+
+SSS_WARNINGS='
+ -Wall
+ -Wextra
+ -Wno-unused-parameter
+ -Wno-sign-compare
+ -Wformat-security
clang reports some warnings with this flags.
src/providers/krb5/krb5_utils.c:1008:27: error: missing field 'client'
initializer [-Werror,-Wmissing-field-initializers]
krb5_creds cred = { 0 };
Do we care about this?
according to c99 standard it should be false positive
[6.7.8.21] If there are fewer initializers in a brace-enclosed list than there
are elements or members of an aggregate, or fewer characters in a string
literal used to initialize an array of known size than there are elements in
the array, the remainder of the aggregate shall be initialized implicitly the
same as objects that have static storage duration.
^^^^^^^^^^^^^^^^^^^^^^^^^^^
the most interesting part
LS