aboutsummaryrefslogtreecommitdiff
path: root/client/srvtab.c
diff options
context:
space:
mode:
authorRuss Allbery <eagle@eyrie.org>2020-05-17 19:57:08 -0700
committerRuss Allbery <eagle@eyrie.org>2020-05-17 19:57:08 -0700
commit1ce29ab7479380f671ba77023e4c08c3ec6a1d9e (patch)
tree050bb06a5f4a6dbc11956299ff0301b77d4aea1a /client/srvtab.c
parentf5d8568f66a66511eb4f38ef985216761fa1bb01 (diff)
Fix warnings from Clang's analyzer
Suppress a warning about not declaring a function noreturn that's only noreturn in some configurations. Add an assert to unconfuse the static analyzer about a default value for a struct.
Diffstat (limited to 'client/srvtab.c')
-rw-r--r--client/srvtab.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/client/srvtab.c b/client/srvtab.c
index c0c5c40..5fd39dc 100644
--- a/client/srvtab.c
+++ b/client/srvtab.c
@@ -23,6 +23,15 @@
# define REALM_SZ 40
#endif
+/*
+ * Disable the warning about a missing noreturn attribute, which may be
+ * triggered if the version of the Kerberos libraries doesn't contain
+ * krb5_524_conv_principal.
+ */
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 2) || defined(__clang__)
+# pragma GCC diagnostic ignored "-Wmissing-noreturn"
+#endif
+
/*
* Given the Kerberos context, srvtab file name, a Kerberos principal (as a