diff options
| author | Greg Hudson <ghudson@mit.edu> | 2009-11-02 18:00:40 +0000 |
|---|---|---|
| committer | Greg Hudson <ghudson@mit.edu> | 2009-11-02 18:00:40 +0000 |
| commit | 5bf926ba4c8047b5dec75be2277d5f9b78fc04c2 (patch) | |
| tree | 31aaaf73a3ccb55e3ec4a67d710203253fb2294c /src/util | |
| parent | 36d48179639fcf05a250ed973eaebfa3d4348a25 (diff) | |
| download | krb5-5bf926ba4c8047b5dec75be2277d5f9b78fc04c2.tar.gz krb5-5bf926ba4c8047b5dec75be2277d5f9b78fc04c2.tar.xz krb5-5bf926ba4c8047b5dec75be2277d5f9b78fc04c2.zip | |
Clean up a bunch of signed/unsigned comparison warnings
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23120 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/util')
| -rw-r--r-- | src/util/et/error_message.c | 2 | ||||
| -rw-r--r-- | src/util/t_array.pm | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/util/et/error_message.c b/src/util/et/error_message.c index 734cedf2e6..bcff6cd7b1 100644 --- a/src/util/et/error_message.c +++ b/src/util/et/error_message.c @@ -141,7 +141,7 @@ error_message(long code) goto oops; /* This could trip if int is 16 bits. */ - if ((unsigned long)(int)code != code) + if ((unsigned long)(int)code != (unsigned long)code) abort (); #ifdef HAVE_STRERROR_R cp = get_thread_buffer(); diff --git a/src/util/t_array.pm b/src/util/t_array.pm index ed319d60df..4a05ab866b 100644 --- a/src/util/t_array.pm +++ b/src/util/t_array.pm @@ -67,15 +67,15 @@ static inline long return arr->allocated; } -static inline long +static inline unsigned long <NAME>_max_size(<NAME> *arr) { size_t upper_bound; upper_bound = SIZE_MAX / sizeof(*arr->elts); - if (upper_bound > LONG_MAX) - upper_bound = LONG_MAX; - return (long) upper_bound; + if (upper_bound > ULONG_MAX) + upper_bound = ULONG_MAX; + return (unsigned long) upper_bound; } static inline int @@ -105,7 +105,7 @@ static inline int static inline <TYPE> * <NAME>_getaddr (<NAME> *arr, long idx) { - if (idx < 0 || idx >= arr->allocated) + if (idx < 0 || (unsigned long) idx >= arr->allocated) abort(); return arr->elts + idx; } |
