]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix cbdata 'error: expression result unused' errors
authorAmos Jeffries <squid3@treenet.co.nz>
Sat, 26 Oct 2013 02:16:10 +0000 (20:16 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 26 Oct 2013 02:16:10 +0000 (20:16 -0600)
Detected by Clang.

src/cbdata.h

index d0b5d6aa8b70f830254f873ec60d890b43c49dcc..f29862180a27b491a782cb4dbcd9b33210894575 100644 (file)
@@ -416,7 +416,7 @@ cbdata_type cbdataInternalAddType(cbdata_type type, const char *label, int size,
  *
  \param type           Type being initialized
  */
-#define CBDATA_INIT_TYPE(type) (CBDATA_##type ?  CBDATA_UNKNOWN : (CBDATA_##type = cbdataInternalAddType(CBDATA_##type, #type, sizeof(type), NULL)))
+#define CBDATA_INIT_TYPE(type) (CBDATA_##type ? (void)0 : (CBDATA_##type = cbdataInternalAddType(CBDATA_##type, #type, sizeof(type), NULL)))
 
 /**
  \ingroup CBDATAAPI
@@ -429,7 +429,7 @@ cbdata_type cbdataInternalAddType(cbdata_type type, const char *label, int size,
  \param type           Type being initialized
  \param free_func      The freehandler called when the last known reference to an allocated entry goes away.
  */
-#define CBDATA_INIT_TYPE_FREECB(type, free_func)       (CBDATA_##type ?  CBDATA_UNKNOWN : (CBDATA_##type = cbdataInternalAddType(CBDATA_##type, #type, sizeof(type), free_func)))
+#define CBDATA_INIT_TYPE_FREECB(type, free_func)       (CBDATA_##type ? (void)0 : (CBDATA_##type = cbdataInternalAddType(CBDATA_##type, #type, sizeof(type), free_func)))
 
 /**
  \ingroup CBDATA