summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nxt_clang.h11
-rw-r--r--src/nxt_conf_validation.c3
2 files changed, 13 insertions, 1 deletions
diff --git a/src/nxt_clang.h b/src/nxt_clang.h
index a10de08a..26afba7a 100644
--- a/src/nxt_clang.h
+++ b/src/nxt_clang.h
@@ -132,6 +132,17 @@ nxt_prefetch(a)
#endif
+#if (NXT_HAVE_GCC_ATTRIBUTE_UNUSED)
+
+#define NXT_MAYBE_UNUSED __attribute__((__unused__))
+
+#else
+
+#define NXT_MAYBE_UNUSED
+
+#endif
+
+
#if (NXT_HAVE_BUILTIN_POPCOUNT)
#define nxt_popcount __builtin_popcount
diff --git a/src/nxt_conf_validation.c b/src/nxt_conf_validation.c
index 4dd46dd8..876c5bbc 100644
--- a/src/nxt_conf_validation.c
+++ b/src/nxt_conf_validation.c
@@ -77,7 +77,8 @@ static nxt_int_t nxt_conf_vldt_error(nxt_conf_validation_t *vldt,
static nxt_int_t nxt_conf_vldt_var(nxt_conf_validation_t *vldt, nxt_str_t *name,
nxt_str_t *value);
nxt_inline nxt_int_t nxt_conf_vldt_unsupported(nxt_conf_validation_t *vldt,
- nxt_conf_value_t *value, void *data);
+ nxt_conf_value_t *value, void *data)
+ NXT_MAYBE_UNUSED;
static nxt_int_t nxt_conf_vldt_mtypes(nxt_conf_validation_t *vldt,
nxt_conf_value_t *value, void *data);