From fb1debaa68b89a4733d8e82545a45fcf3eab8892 Mon Sep 17 00:00:00 2001 From: Marius Gedminas Date: Fri, 24 Feb 2017 15:04:09 +0200 Subject: [PATCH] Fix incompatible pointer type warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The warnings looked like this: htmlparse.c: In function ‘yyparse’: htmlparse.c:1810:18: warning: passing argument 1 of ‘yyerror’ from incompatible pointer type [-Wincompatible-pointer-types] htmlparse.y:40:13: note: expected ‘PyObject ** {aka struct _object **}’ but argument is of type ‘PyObject * {aka struct _object *}’ htmlparse.c:1927:12: warning: passing argument 1 of ‘yyerror’ from incompatible pointer type [-Wincompatible-pointer-types] htmlparse.y:40:13: note: expected ‘PyObject ** {aka struct _object **}’ but argument is of type ‘PyObject * {aka struct _object *}’ The argument is not used, so it doesn't really matter what pointer type it is. --- linkcheck/HtmlParser/htmlparse.c | 2 +- linkcheck/HtmlParser/htmlparse.y | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/linkcheck/HtmlParser/htmlparse.c b/linkcheck/HtmlParser/htmlparse.c index a550e174..02b94ab8 100644 --- a/linkcheck/HtmlParser/htmlparse.c +++ b/linkcheck/HtmlParser/htmlparse.c @@ -102,7 +102,7 @@ extern int yyget_lineno(void*); #define YYERROR_VERBOSE 1 /* standard error reporting, indicating an internal error */ -static void yyerror (YYSTYPE *locp, char const *msg) { +static void yyerror (void *locp, char const *msg) { fprintf(stderr, "htmlsax: internal parse error: %s\n", msg); } diff --git a/linkcheck/HtmlParser/htmlparse.y b/linkcheck/HtmlParser/htmlparse.y index e484d41a..0f22e10e 100644 --- a/linkcheck/HtmlParser/htmlparse.y +++ b/linkcheck/HtmlParser/htmlparse.y @@ -37,7 +37,7 @@ extern int yyget_lineno(void*); #define YYERROR_VERBOSE 1 /* standard error reporting, indicating an internal error */ -static void yyerror (YYSTYPE *locp, char const *msg) { +static void yyerror (void *locp, char const *msg) { fprintf(stderr, "htmlsax: internal parse error: %s\n", msg); }