diff mbox series

[v2,18/39] util/log: Mark qemu_log_trylock as G_GNUC_WARN_UNUSED_RESULT

Message ID 20220326132534.543738-27-richard.henderson@linaro.org
State Superseded
Headers show
Series Logging cleanup and per-thread logfiles | expand

Commit Message

Richard Henderson March 26, 2022, 1:25 p.m. UTC
Now that all uses have been updated, consider a missing
test of the result of qemu_log_trylock a bug and Werror.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 include/qemu/log.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alex Bennée April 14, 2022, 2:18 p.m. UTC | #1
Richard Henderson <richard.henderson@linaro.org> writes:

> Now that all uses have been updated, consider a missing
> test of the result of qemu_log_trylock a bug and Werror.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
diff mbox series

Patch

diff --git a/include/qemu/log.h b/include/qemu/log.h
index 2d9455dc85..3a1f3a6020 100644
--- a/include/qemu/log.h
+++ b/include/qemu/log.h
@@ -67,7 +67,7 @@  static inline bool qemu_log_separate(void)
 
 /* Lock/unlock output. */
 
-FILE *qemu_log_trylock(void);
+FILE *qemu_log_trylock(void) G_GNUC_WARN_UNUSED_RESULT;
 void qemu_log_unlock(FILE *fd);
 
 /* Logging functions: */