]> andersk Git - test.git/blobdiff - libhttp/url.c
Some changes to improve compatibility with MacOS X.
[test.git] / libhttp / url.c
index 088eea73d760b54cc4424f62f2f7fedf15622d98..dd410bb4fdaf81e5698d7cdf49a3f3b828d5aa34 100644 (file)
 
 #include "logging/logging.h"
 
+#ifdef HAVE_UNUSED
+#defined ATTR_UNUSED __attribute__((unused))
+#defined UNUSED(x)   do { } while (0)
+#else
+#define ATTR_UNUSED
+#define UNUSED(x)    do { (void)(x); } while (0)
+#endif
+
 static char *urlUnescape(char *s) {
   int warned    = 0;
   char *r       = s;
@@ -86,8 +94,9 @@ static char *urlUnescape(char *s) {
   return r;
 }
 
-static void urlDestroyHashMapEntry(void *arg, char *key, char *value) {
-  (void)arg;
+static void urlDestroyHashMapEntry(void *arg ATTR_UNUSED, char *key,
+                                   char *value) {
+  UNUSED(arg);
   free(key);
   free(value);
 }
This page took 0.045112 seconds and 4 git commands to generate.