]> Sergey Matveev's repositories - nnn.git/commitdiff
make clang-tidy happy
authorNRK <nrk@disroot.org>
Fri, 22 Jul 2022 11:31:55 +0000 (17:31 +0600)
committerNRK <nrk@disroot.org>
Fri, 22 Jul 2022 11:31:55 +0000 (17:31 +0600)
src/icons-hash.c
src/icons.h

index 70a5d1c9d0bb25e1462204908e866e7ee4f95e5a..b902d6aa7f329fb7dc9c39477241a45bdfb19ea1 100644 (file)
@@ -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
index 293ce9aadfb8d46415d3dd7b345f857f3540ae06..e761071d48da7560a22e74029969af3510e984ba 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef INCLUDE_ICONS_H
 #define INCLUDE_ICONS_H
 
+#if defined(ICONS_GENERATE) || defined(ICONS_ENABLED)
+
 /*
  * 1st arg = ICONS_IN_TERM
  *
        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 */