ctf: define yystrlen to strlen
[babeltrace.git] / src / plugins / ctf / common / metadata / parser.y
index 16868179282c18b66da6a110becc880336d3cc68..71f2d5fefc62eb453fa5d655ce7cb1424b096baa 100644 (file)
@@ -1036,6 +1036,17 @@ void ctf_scanner_free(struct ctf_scanner *scanner)
        free(scanner);
 }
 
+/*
+ * The bison-provided version of strlen (yystrlen) generates a benign
+ * -Wnull-dereference warning.  That version is used when building on cygwin,
+ * for example, but you can also enable it by hand (to test) by removing the
+ * preprocessor conditional around it.
+ *
+ * Define yystrlen such that it will always use strlen.  As far as we know,
+ * strlen provided by all the platforms we use is reliable.
+ */
+#define yystrlen strlen
+
 %}
 
 /*
This page took 0.028588 seconds and 4 git commands to generate.