ctf: Remove redundant declarations of lexer/parser functions
[babeltrace.git] / src / plugins / ctf / common / metadata / parser.y
index 16868179282c18b66da6a110becc880336d3cc68..54d28b6fef67b811f8a88d6a1da377782a0fd15e 100644 (file)
@@ -59,8 +59,6 @@ _bt_list_splice_tail (struct bt_list_head *add, struct bt_list_head *head)
        }
 }
 
-BT_HIDDEN
-int yyparse(struct ctf_scanner *scanner, yyscan_t yyscanner);
 BT_HIDDEN
 int yylex(union YYSTYPE *yyval, yyscan_t yyscanner);
 BT_HIDDEN
@@ -1036,6 +1034,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.024214 seconds and 4 git commands to generate.