diff options
| author | Jeffrey Altman <jaltman@secure-endpoints.com> | 2003-12-15 16:15:30 +0000 |
|---|---|---|
| committer | Jeffrey Altman <jaltman@secure-endpoints.com> | 2003-12-15 16:15:30 +0000 |
| commit | 22de4e6c0fa169ddc831e8cc552960ab8ea932f9 (patch) | |
| tree | acf01961b2a8b1ae19cf8f17feab691441a27c19 /src/include | |
| parent | 9cda449368c5a04eafce6bc4ae0fffdd6050c43e (diff) | |
| download | krb5-22de4e6c0fa169ddc831e8cc552960ab8ea932f9.tar.gz krb5-22de4e6c0fa169ddc831e8cc552960ab8ea932f9.tar.xz krb5-22de4e6c0fa169ddc831e8cc552960ab8ea932f9.zip | |
* k5-platform.h: apply casts (unsigned char) to the assignments from
64-bit ints to unsigned char fields to avoid warnings
ticket: 1471
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15925 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/k5-platform.h | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/include/k5-platform.h b/src/include/k5-platform.h index e6d2ad0e4..48f846879 100644 --- a/src/include/k5-platform.h +++ b/src/include/k5-platform.h @@ -81,26 +81,26 @@ store_32_le (unsigned int val, unsigned char *p) static inline void store_64_be (UINT64_TYPE val, unsigned char *p) { - p[0] = (val >> 56) & 0xff; - p[1] = (val >> 48) & 0xff; - p[2] = (val >> 40) & 0xff; - p[3] = (val >> 32) & 0xff; - p[4] = (val >> 24) & 0xff; - p[5] = (val >> 16) & 0xff; - p[6] = (val >> 8) & 0xff; - p[7] = (val ) & 0xff; + p[0] = (unsigned char)((val >> 56) & 0xff); + p[1] = (unsigned char)((val >> 48) & 0xff); + p[2] = (unsigned char)((val >> 40) & 0xff); + p[3] = (unsigned char)((val >> 32) & 0xff); + p[4] = (unsigned char)((val >> 24) & 0xff); + p[5] = (unsigned char)((val >> 16) & 0xff); + p[6] = (unsigned char)((val >> 8) & 0xff); + p[7] = (unsigned char)((val ) & 0xff); } static inline void store_64_le (UINT64_TYPE val, unsigned char *p) { - p[7] = (val >> 56) & 0xff; - p[6] = (val >> 48) & 0xff; - p[5] = (val >> 40) & 0xff; - p[4] = (val >> 32) & 0xff; - p[3] = (val >> 24) & 0xff; - p[2] = (val >> 16) & 0xff; - p[1] = (val >> 8) & 0xff; - p[0] = (val ) & 0xff; + p[7] = (unsigned char)((val >> 56) & 0xff); + p[6] = (unsigned char)((val >> 48) & 0xff); + p[5] = (unsigned char)((val >> 40) & 0xff); + p[4] = (unsigned char)((val >> 32) & 0xff); + p[3] = (unsigned char)((val >> 24) & 0xff); + p[2] = (unsigned char)((val >> 16) & 0xff); + p[1] = (unsigned char)((val >> 8) & 0xff); + p[0] = (unsigned char)((val ) & 0xff); } static inline unsigned short load_16_be (unsigned char *p) |
