silence warnings for UNUSED variables without changeing the funtion interfaces -...
[rrdtool.git] / src / unused.h
diff --git a/src/unused.h b/src/unused.h
new file mode 100644 (file)
index 0000000..b5ac841
--- /dev/null
@@ -0,0 +1,11 @@
+/* define a macro to wrap variables in that would
+   otherwhise generate UNUSED variable warnings */
+
+#ifdef UNUSED
+#elif defined(__GNUC__)
+# define UNUSED(x) x __attribute__((unused))
+#elif defined(__LCLINT__)
+# define UNUSED(x) /*@unused@*/ x
+#else
+# define UNUSED(x) x
+#endif