[PATCH 1/7] virHashNew: Ensure return value is used

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Declare the function with G_GNUC_WARN_UNUSED_RESULT as we always want to
use the returned value.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux