Commit e6fcd9e
drivers: smbus: stm32: add cast to avoid warning
Previously, the function `smbus_stm32_pcall()` implicitly cast
`uint16_t *` to `uint8_t *`. Add an explicit cast to avoid warning.
```shell
..drivers/smbus/smbus_stm32.c:358:32: error: initialization of \
'uint8_t *' {aka 'unsigned char *'} from incompatible pointer type \
'uint16_t *' {aka 'short unsigned int *'} \
[-Werror=incompatible-pointer-types]
358 | .buf = &send_word,
| ^
..drivers/smbus/smbus_stm32.c:358:32: note: (near initialization \
for 'messages[1].buf')
..drivers/smbus/smbus_stm32.c:363:32: error: initialization of \
'uint8_t *' {aka 'unsigned char *'} from incompatible pointer type \
'uint16_t *' {aka 'short unsigned int *'} \
[-Werror=incompatible-pointer-types]
363 | .buf = recv_word,
| ^~~~~~~~~
```
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>1 parent 07d29ec commit e6fcd9e
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
355 | 355 | | |
356 | 356 | | |
357 | 357 | | |
358 | | - | |
| 358 | + | |
359 | 359 | | |
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
363 | | - | |
| 363 | + | |
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
| |||
0 commit comments