diff options
author | Tobias Brunner <tobias@strongswan.org> | 2011-11-25 09:40:30 +0100 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2011-11-25 09:40:30 +0100 |
commit | edad908792317422e2f0371d8c83396caee6b8e7 (patch) | |
tree | 10c84c5db801c6df7fd85f9633269dbaa0ed1392 /src/libstrongswan/credentials/cred_encoding.c | |
parent | 4f775afda9ad0ad023c6c521f3dd68cca1e3528b (diff) | |
download | strongswan-edad908792317422e2f0371d8c83396caee6b8e7.tar.bz2 strongswan-edad908792317422e2f0371d8c83396caee6b8e7.tar.xz |
Fixed compiler warnings regarding enum comparison.
Warnings like
comparison of unsigned expression < 0 is always false
are reported with -Wextra when enum types that are compiled to an
unsigned type (which is up to the compiler) are checked for negativity.
Diffstat (limited to 'src/libstrongswan/credentials/cred_encoding.c')
-rw-r--r-- | src/libstrongswan/credentials/cred_encoding.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstrongswan/credentials/cred_encoding.c b/src/libstrongswan/credentials/cred_encoding.c index a7637b598..4865984dd 100644 --- a/src/libstrongswan/credentials/cred_encoding.c +++ b/src/libstrongswan/credentials/cred_encoding.c @@ -116,7 +116,7 @@ METHOD(cred_encoding_t, get_cache, bool, { chunk_t *chunk; - if (type >= CRED_ENCODING_MAX || type < 0) + if (type >= CRED_ENCODING_MAX || (int)type < 0) { return FALSE; } @@ -142,7 +142,7 @@ static bool encode(private_cred_encoding_t *this, cred_encoding_type_t type, bool success = FALSE; chunk_t *chunk; - if (type >= CRED_ENCODING_MAX || type < 0) + if (type >= CRED_ENCODING_MAX || (int)type < 0) { return FALSE; } @@ -195,7 +195,7 @@ METHOD(cred_encoding_t, cache, void, { chunk_t *chunk; - if (type >= CRED_ENCODING_MAX || type < 0) + if (type >= CRED_ENCODING_MAX || (int)type < 0) { return free(encoding.ptr); } |