summaryrefslogtreecommitdiff
path: root/dtach.h
diff options
context:
space:
mode:
authorNed T. Crigler <crigler@gmail.com>2025-06-16 20:25:29 -0700
committerNed T. Crigler <crigler@gmail.com>2025-06-17 08:14:50 -0700
commitc0d6ac74247c90b9a0e08aa066b3037430b7edce (patch)
tree9d24e53abafe7fc6650c9b556928dd3381be31c5 /dtach.h
parent740a15ba2319086eb34bdc6275950e0aa6666a71 (diff)
Suppress unused parameter 'sig' warning from gcc
gcc now warns that sig is an unused parameter: attach.c: In function 'win_change': attach.c:99:16: warning: unused parameter 'sig' [-Wunused-parameter] 99 | win_change(int sig) | ~~~~^~~
Diffstat (limited to 'dtach.h')
-rw-r--r--dtach.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/dtach.h b/dtach.h
index c4d39cb..40d0879 100644
--- a/dtach.h
+++ b/dtach.h
@@ -18,6 +18,18 @@
#ifndef dtach_h
#define dtach_h
+#if defined(__has_attribute)
+#if __has_attribute(unused)
+#define ATTRIBUTE_UNUSED __attribute__((__unused__))
+#else
+#define ATTRIBUTE_UNUSED
+#endif
+#elif defined(__GNUC__) || defined(__clang__)
+#define ATTRIBUTE_UNUSED __attribute__((__unused__))
+#else
+#define ATTRIBUTE_UNUSED
+#endif
+
#include <config.h>
#include <errno.h>