perf tools: Add missing parse_events_error() prototype
authorArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 15 Feb 2017 13:09:11 +0000 (10:09 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 15 Feb 2017 14:20:49 +0000 (11:20 -0300)
As pointed out by clang, we were not providing a prototype for a
function before using it:

  util/parse-events.y:699:6: error: conflicting types for 'parse_events_error'
  void parse_events_error(YYLTYPE *loc, void *data,
       ^
  /tmp/build/perf/util/parse-events-bison.c:2224:7: note: previous implicit declaration is here
        yyerror (&yylloc, _data, scanner, YY_("syntax error"));
        ^
  /tmp/build/perf/util/parse-events-bison.c:65:25: note: expanded from macro 'yyerror'
  #define yyerror         parse_events_error

  1 error generated.

One line fix it.

Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/20170215130605.GC4020@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/parse-events.y

index 3a51963806098f7493ba34205d953e9b9c98e99b..a14b47ab3879bd67db8854d495ba2e195c4f9068 100644 (file)
@@ -17,6 +17,8 @@
 #include "parse-events.h"
 #include "parse-events-bison.h"
 
+void parse_events_error(YYLTYPE *loc, void *data, void *scanner, char const *msg);
+
 #define ABORT_ON(val) \
 do { \
        if (val) \