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:
Jonathan Reichelt Gjertsen 2021-05-23 15:21:09 +02:00 committed by GitHub
parent a32d614b43
commit 596d08ea62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {