commit c3a42f0d92ae3b5a57b611303ed93da7e2c34ea2
parent 3b09fd1c75980f00d031b4e3eee70212573fbf71
Author: NRK <nrk@disroot.org>
Date: Fri, 22 Jul 2022 17:31:55 +0600
make clang-tidy happy
Diffstat:
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/icons-hash.c b/src/icons-hash.c
@@ -184,6 +184,7 @@ main(void)
#define TOUPPER(ch) (((ch) >= 'a' && (ch) <= 'z') ? ((ch) - 'a' + 'A') : (ch))
#endif
+#if defined(ICONS_GENERATE) || defined(ICONS_ENABLED)
static uint16_t
icon_ext_hash(const char *str)
{
@@ -199,3 +200,4 @@ icon_ext_hash(const char *str)
ASSERT(hash < ARRLEN(table));
return hash;
}
+#endif
diff --git a/src/icons.h b/src/icons.h
@@ -1,6 +1,8 @@
#ifndef INCLUDE_ICONS_H
#define INCLUDE_ICONS_H
+#if defined(ICONS_GENERATE) || defined(ICONS_ENABLED)
+
/*
* 1st arg = ICONS_IN_TERM
*
@@ -150,7 +152,7 @@
COLOR_X(COLOR_VIM, 28) /* Green4 */ \
/* X-Macro: https://en.wikipedia.org/wiki/X_Macro */
-#define COLOR_X(N, V) N = V,
+#define COLOR_X(N, V) N = (V),
enum { COLOR_LIST };
#undef COLOR_X
#define COLOR_X(N, V) N,
@@ -413,4 +415,6 @@ static const struct icon_pair icons_ext[] = {
};
#endif
+#endif /* defined(ICONS_GENERATE) || defined(ICONS_ENABLED) */
+
#endif /* INCLUDE_ICONS_H */