aboutsummaryrefslogtreecommitdiffstats
path: root/libar2_type_to_string.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2022-01-19 22:50:49 +0100
committerMattias Andrée <maandree@kth.se>2022-01-19 22:50:49 +0100
commit3e3b07bfcb352e0931a58db2735390c71f1a84a2 (patch)
tree90f0ff7f59277d93f98bea498abedb996e3aa340 /libar2_type_to_string.c
parentImprove portability (diff)
downloadlibar2-3e3b07bfcb352e0931a58db2735390c71f1a84a2.tar.gz
libar2-3e3b07bfcb352e0931a58db2735390c71f1a84a2.tar.bz2
libar2-3e3b07bfcb352e0931a58db2735390c71f1a84a2.tar.xz
Fix warnings
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'libar2_type_to_string.c')
-rw-r--r--libar2_type_to_string.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libar2_type_to_string.c b/libar2_type_to_string.c
index 3092101..4866107 100644
--- a/libar2_type_to_string.c
+++ b/libar2_type_to_string.c
@@ -11,9 +11,14 @@ libar2_type_to_string(enum libar2_argon2_type type, enum libar2_casing casing)
{"ARGON2D", "ARGON2I", "ARGON2ID", NULL, "ARGON2DS"}
};
+#if defined(__clang__)
+# pragma clang diagnostic ignored "-Wtautological-unsigned-enum-zero-compare"
+#endif
+
if (type < 0 || casing < 0 || type >= ELEMSOF(*strs) || casing >= ELEMSOF(strs) || !strs[casing][type]) {
errno = EINVAL;
return NULL;
}
+
return strs[casing][type];
}