summaryrefslogtreecommitdiffstats
path: root/include/unused.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 02:56:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 02:56:35 +0000
commiteba0cfa6b0bef4f2e73c8630a7efa3944df8b0f8 (patch)
tree74c37eede1f0634cc5de1c63c934edaa1630c6bc /include/unused.h
parentInitial commit. (diff)
downloadkexec-tools-eba0cfa6b0bef4f2e73c8630a7efa3944df8b0f8.tar.xz
kexec-tools-eba0cfa6b0bef4f2e73c8630a7efa3944df8b0f8.zip
Adding upstream version 1:2.0.27.upstream/1%2.0.27upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'include/unused.h')
-rw-r--r--include/unused.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/unused.h b/include/unused.h
new file mode 100644
index 0000000..7b40190
--- /dev/null
+++ b/include/unused.h
@@ -0,0 +1,15 @@
+#ifndef UNUSED_H
+#define UNUSED_H
+
+/* http://sourcefrog.net/weblog/software/languages/C/unused.html */
+
+#ifdef UNUSED
+#elif defined(__GNUC__)
+# define UNUSED(x) UNUSED_ ## x __attribute__((unused))
+#elif defined(__LCLINT__)
+# define UNUSED(x) /*@unused@*/ x
+#else
+# define UNUSED(x) x
+#endif
+
+#endif