diff options
| author | Steve Dickson <steved@redhat.com> | 2018-02-20 11:42:16 -0500 |
|---|---|---|
| committer | Steve Dickson <steved@redhat.com> | 2018-02-23 09:17:48 -0500 |
| commit | e704c38beb32beeb8ebd26f256c6a21b58ab3d9d (patch) | |
| tree | 25b4c80ef5721c59f3ae23e6db2c00ac6cb3392a | |
| parent | 442855b54a651b6f42f5c7b508d6aef56b4af606 (diff) | |
| download | nfs-utils-e704c38beb32beeb8ebd26f256c6a21b58ab3d9d.tar.gz | |
Removed undef warnings
Added the -Werror=undef warning flag and
then fixed a few #ifdefs
Signed-off-by: Steve Dickson <steved@redhat.com>
| -rw-r--r-- | configure.ac | 1 | ||||
| -rw-r--r-- | 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 |
