mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
spa: Fix a compiler warning caused by unchecked read()
Wrap read() with the CHECK() used elsewhre in the test program, in order
to render out the compiler warning represented by this transcript:
➜ pipewire (af38edea) ✔ make
ninja -C /home/jarkko/Projects/pipewire/build
ninja: Entering directory `/home/jarkko/Projects/pipewire/build'
[6/397] Compiling C object spa/plugins/alsa/test-timer.p/test-timer.c.o
../spa/plugins/alsa/test-timer.c: In function ‘main’:
../spa/plugins/alsa/test-timer.c:195:3: warning: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
195 | read(state.timerfd, &expirations, sizeof(expirations));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@iki.fi>
This commit is contained in:
parent
af38edea82
commit
8f76d80fde
1 changed files with 1 additions and 1 deletions
|
|
@ -192,7 +192,7 @@ int main(int argc, char *argv[])
|
|||
* this can be done in a poll loop as well */
|
||||
while (true) {
|
||||
uint64_t expirations;
|
||||
read(state.timerfd, &expirations, sizeof(expirations));
|
||||
CHECK(read(state.timerfd, &expirations, sizeof(expirations)), "read");
|
||||
on_timer_wakeup(&state);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue