kernel/pipe: squash compiler warning
The compiler complains that:
```
zephyr/kernel/include/kernel_internal.h:121:29:
error: 'reader' may be used uninitialized [-Werror=maybe-uninitialized]
121 | thread->swap_retval = value;
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~
zephyr/kernel/pipe.c: In function 'copy_to_pending_readers':
zephyr/kernel/pipe.c:92:26: note: 'reader' was declared here
92 | struct k_thread *reader;
| ^~~~~~
```
The static analyzer fails to see through the `LOCK_SCHED_SPINLOCK`
construct that the `reader` pointer is always initialized.
Signed-off-by:
Nicolas Pitre <npitre@baylibre.com>
Loading
Please sign in to comment