aboutsummaryrefslogtreecommitdiffstats
path: root/libar2_type_to_string.c
diff options
context:
space:
mode:
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];
}