From: Steve Dickson <steved@redhat.com>
To: Linux NFS Mailing list <linux-nfs@vger.kernel.org>
Subject: [PATCH 5/7] Removed undef warnings
Date: Tue, 20 Feb 2018 13:50:32 -0500 [thread overview]
Message-ID: <20180220185034.26301-6-steved@redhat.com> (raw)
In-Reply-To: <20180220185034.26301-1-steved@redhat.com>
Added the -Werror=undef warning flag and
then fixed a few #ifdefs
Signed-off-by: Steve Dickson <steved@redhat.com>
---
configure.ac | 1 +
utils/gssd/krb5_util.c | 6 +++---
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index 11b994b..2364275 100644
--- a/configure.ac
+++ b/configure.ac
@@ -552,6 +552,7 @@ my_am_cflags="\
-Werror=missing-declarations \
-Werror=format-overflow=2 \
-Werror=format=2 \
+ -Werror=undef \
"
AC_SUBST([AM_CFLAGS], ["$my_am_cflags"])
diff --git a/utils/gssd/krb5_util.c b/utils/gssd/krb5_util.c
index b64818a..6e61da2 100644
--- a/utils/gssd/krb5_util.c
+++ b/utils/gssd/krb5_util.c
@@ -333,7 +333,7 @@ gssd_get_single_krb5_cred(krb5_context context,
struct gssd_k5_kt_princ *ple,
int nocache)
{
-#if HAVE_KRB5_GET_INIT_CREDS_OPT_SET_ADDRESSLESS
+#ifdef HAVE_KRB5_GET_INIT_CREDS_OPT_SET_ADDRESSLESS
krb5_get_init_creds_opt *init_opts = NULL;
#else
krb5_get_init_creds_opt options;
@@ -372,7 +372,7 @@ gssd_get_single_krb5_cred(krb5_context context,
if ((krb5_unparse_name(context, ple->princ, &pname)))
pname = NULL;
-#if HAVE_KRB5_GET_INIT_CREDS_OPT_SET_ADDRESSLESS
+#ifdef HAVE_KRB5_GET_INIT_CREDS_OPT_SET_ADDRESSLESS
code = krb5_get_init_creds_opt_alloc(context, &init_opts);
if (code) {
k5err = gssd_k5_err_msg(context, code);
@@ -454,7 +454,7 @@ gssd_get_single_krb5_cred(krb5_context context,
code = 0;
printerr(2, "%s: principal '%s' ccache:'%s'\n", __func__, pname, cc_name);
out:
-#if HAVE_KRB5_GET_INIT_CREDS_OPT_SET_ADDRESSLESS
+#ifdef HAVE_KRB5_GET_INIT_CREDS_OPT_SET_ADDRESSLESS
if (init_opts)
krb5_get_init_creds_opt_free(context, init_opts);
#endif
--
2.14.3
next prev parent reply other threads:[~2018-02-20 18:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-20 18:50 [PATCH 0/7] nfs-utils: Use -Werror warning flags to clean up the code Steve Dickson
2018-02-20 18:50 ` [PATCH 1/7] configure.ac: clean up Steve Dickson
2018-02-20 18:50 ` [PATCH 2/7] Removed missing-prototypes warnings Steve Dickson
2018-02-20 18:50 ` [PATCH 3/7] Removed format-overflow=2 warnings Steve Dickson
2018-02-20 18:50 ` [PATCH 4/7] Removed format=2 warnings Steve Dickson
2018-02-20 18:50 ` Steve Dickson [this message]
2018-02-20 18:50 ` [PATCH 6/7] Removed missing-include-dirs warnings Steve Dickson
2018-02-20 18:50 ` [PATCH 7/7] Added more -Werror= warning flags Steve Dickson
2018-02-23 14:21 ` [PATCH 0/7] nfs-utils: Use -Werror warning flags to clean up the code Steve Dickson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180220185034.26301-6-steved@redhat.com \
--to=steved@redhat.com \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.