Add missing cast to uint32_t in hw_divider_u32_quotient for host (#436)
Fixes the following warning: ``` [...]/pico-sdk/src/host/hardware_divider/include/hardware/divider.h:81:26: warning: operand of ?: changes signedness from 'int' to 'uint32_t' {aka 'unsigned int'} due to unsignedness of other operand [-Wsign-compare] return b ? (a / b) : -1; ^~ ```
This commit is contained in:
parent
a32d614b43
commit
596d08ea62
@ -78,7 +78,7 @@ static inline int32_t hw_divider_s32_remainder_wait() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline uint32_t hw_divider_u32_quotient(uint32_t a, uint32_t b) {
|
static inline uint32_t hw_divider_u32_quotient(uint32_t a, uint32_t b) {
|
||||||
return b ? (a / b) : -1;
|
return b ? (a / b) : (uint32_t)(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint32_t hw_divider_u32_remainder(uint32_t a, uint32_t b) {
|
static inline uint32_t hw_divider_u32_remainder(uint32_t a, uint32_t b) {
|
||||||
|
Loading…
Reference in New Issue
Block a user