tests: Make test_per_application_leaks more robust
[lttng-tools.git] / src / common / filter / filter-parser.ypp
index 0f11c234d6197f30ab3b9cea48ea749bf6697fbe..e3fae6394fcaa0cb6a76eaec0191829714d14045 100644 (file)
@@ -22,6 +22,7 @@
 #include "memstream.hpp"
 
 #include <common/compat/errno.hpp>
+#include <common/compiler.hpp>
 #include <common/macros.hpp>
 
 #define WIDTH_u64_SCANF_IS_A_BROKEN_API        "20"
 #define WIDTH_x64_SCANF_IS_A_BROKEN_API        "17"
 #define WIDTH_lg_SCANF_IS_A_BROKEN_API "4096"  /* Hugely optimistic approximation */
 
+/*
+ * bison 3.8.2 produces a parser with unused, but set, which results in warnings
+ * at build time.
+ */
+#ifdef __clang__
+#pragma clang diagnostic ignored "-Wunused-but-set-variable"
+#endif /* __clang__ */
+
 #ifdef DEBUG
 static const int print_xml = 1;
 #define dbg_printf(fmt, args...)       \
@@ -54,7 +63,7 @@ void yyrestart(FILE * in_str, yyscan_t parser_ctx);
 struct gc_string {
        struct cds_list_head gc;
        size_t alloclen;
-       char s[];
+       char s[LTTNG_FLEXIBLE_ARRAY_MEMBER_LENGTH];
 };
 
 static
This page took 0.023211 seconds and 4 git commands to generate.