compiler.h: replace QEMU_WARN_UNUSED_RESULT with G_GNUC_WARN_UNUSED_RESULT

One less qemu-specific macro. It also helps to make some headers/units
only depend on glib, and thus moved in standalone projects eventually.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
This commit is contained in:
Marc-André Lureau 2022-02-24 00:58:22 +04:00
parent 9edc6313da
commit c08401793a
6 changed files with 16 additions and 16 deletions

View file

@ -19,8 +19,6 @@
#define QEMU_NORETURN __attribute__ ((__noreturn__))
#define QEMU_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
#define QEMU_SENTINEL __attribute__((sentinel))
#if defined(_WIN32) && (defined(__x86_64__) || defined(__i386__))

View file

@ -114,8 +114,8 @@ static inline uint64_t range_upb(Range *range)
* @size may be 0. If the range would overflow, returns -ERANGE, otherwise
* 0.
*/
static inline int QEMU_WARN_UNUSED_RESULT range_init(Range *range, uint64_t lob,
uint64_t size)
G_GNUC_WARN_UNUSED_RESULT
static inline int range_init(Range *range, uint64_t lob, uint64_t size)
{
if (lob + size < lob) {
return -ERANGE;