mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-22 00:47:28 +01:00
Fix -Werror=conversion in fundamental-public.h
This commit is contained in:
1 parent
7f93a94e7a
commit
b9a10d051a
3 files changed
+18
-18
No files matched your search
@@ -807,49 +807,49 @@ wuffs_base__u64__max(uint64_t x, uint64_t y) {
|
||||
static inline uint8_t //
|
||||
wuffs_base__u8__rotate_left(uint8_t x, uint32_t n) {
|
||||
n &= 7;
|
||||
return (x << n) | (x >> (8 - n));
|
||||
return ((uint8_t)(x << n)) | ((uint8_t)(x >> (8 - n)));
|
||||
}
|
||||
|
||||
static inline uint8_t //
|
||||
wuffs_base__u8__rotate_right(uint8_t x, uint32_t n) {
|
||||
n &= 7;
|
||||
return (x >> n) | (x << (8 - n));
|
||||
return ((uint8_t)(x >> n)) | ((uint8_t)(x << (8 - n)));
|
||||
}
|
||||
|
||||
static inline uint16_t //
|
||||
wuffs_base__u16__rotate_left(uint16_t x, uint32_t n) {
|
||||
n &= 15;
|
||||
return (x << n) | (x >> (16 - n));
|
||||
return ((uint16_t)(x << n)) | ((uint16_t)(x >> (16 - n)));
|
||||
}
|
||||
|
||||
static inline uint16_t //
|
||||
wuffs_base__u16__rotate_right(uint16_t x, uint32_t n) {
|
||||
n &= 15;
|
||||
return (x >> n) | (x << (16 - n));
|
||||
return ((uint16_t)(x >> n)) | ((uint16_t)(x << (16 - n)));
|
||||
}
|
||||
|
||||
static inline uint32_t //
|
||||
wuffs_base__u32__rotate_left(uint32_t x, uint32_t n) {
|
||||
n &= 31;
|
||||
return (x << n) | (x >> (32 - n));
|
||||
return ((uint32_t)(x << n)) | ((uint32_t)(x >> (32 - n)));
|
||||
}
|
||||
|
||||
static inline uint32_t //
|
||||
wuffs_base__u32__rotate_right(uint32_t x, uint32_t n) {
|
||||
n &= 31;
|
||||
return (x >> n) | (x << (32 - n));
|
||||
return ((uint32_t)(x >> n)) | ((uint32_t)(x << (32 - n)));
|
||||
}
|
||||
|
||||
static inline uint64_t //
|
||||
wuffs_base__u64__rotate_left(uint64_t x, uint32_t n) {
|
||||
n &= 63;
|
||||
return (x << n) | (x >> (64 - n));
|
||||
return ((uint64_t)(x << n)) | ((uint64_t)(x >> (64 - n)));
|
||||
}
|
||||
|
||||
static inline uint64_t //
|
||||
wuffs_base__u64__rotate_right(uint64_t x, uint32_t n) {
|
||||
n &= 63;
|
||||
return (x >> n) | (x << (64 - n));
|
||||
return ((uint64_t)(x >> n)) | ((uint64_t)(x << (64 - n)));
|
||||
}
|
||||
|
||||
// --------
|
||||
|
||||
Reference in new issue
Block a user