mirror of
https://github.com/raspberrypi/pico-sdk.git
synced 2026-03-12 12:18:17 +01:00
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
1 changed files with 1 additions and 1 deletions
|
|
@ -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) {
|
||||
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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue