Declare the function with G_GNUC_WARN_UNUSED_RESULT as we always want to
use the returned value.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/util/virhash.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/virhash.h b/src/util/virhash.h
index c2a0681317..426d835cfc 100644
--- a/src/util/virhash.h
+++ b/src/util/virhash.h
@@ -50,7 +50,7 @@ typedef int (*virHashSearcher) (const void *payload, const char *name,
/*
* Constructor and destructor.
*/
-GHashTable *virHashNew(virHashDataFree dataFree);
+GHashTable *virHashNew(virHashDataFree dataFree) G_GNUC_WARN_UNUSED_RESULT;
virHashAtomic *virHashAtomicNew(virHashDataFree dataFree);
void virHashFree(GHashTable *table);
ssize_t virHashSize(GHashTable *table);
--
2.31.1