From 3322bb0ce6b8a652a5cec003dcc700ddb3655d23 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Fri, 7 Dec 2012 17:48:30 +0100 Subject: [PATCH] yyerror takes a const char* instead of a char* --- hlslang/MachineIndependent/hlslang.l | 2 +- hlslang/MachineIndependent/hlslang.y | 2 +- tools/bison.simple | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hlslang/MachineIndependent/hlslang.l b/hlslang/MachineIndependent/hlslang.l index c01f574..c6b3c6f 100644 --- a/hlslang/MachineIndependent/hlslang.l +++ b/hlslang/MachineIndependent/hlslang.l @@ -372,7 +372,7 @@ int PaParseString(char* source, TParseContext& parseContextLocal) return 0; } -void yyerror(char *s) +void yyerror(const char *s) { if (((TParseContext *)cpp->pC)->AfterEOF) { if (cpp->tokensBeforeEOF == 1) { diff --git a/hlslang/MachineIndependent/hlslang.y b/hlslang/MachineIndependent/hlslang.y index 534d3aa..76e65ad 100644 --- a/hlslang/MachineIndependent/hlslang.y +++ b/hlslang/MachineIndependent/hlslang.y @@ -35,7 +35,7 @@ Jutta Degener, 1995 #define parseContext (*((TParseContext*)(parseContextLocal))) #define YY_DECL int yylex(YYSTYPE* pyylval, void* parseContextLocal) #define YYLEX_PARAM (void*)(parseContextLocal) - extern void yyerror(char*); + extern void yyerror(const char*); #endif diff --git a/tools/bison.simple b/tools/bison.simple index 690fb2e..ab56642 100644 --- a/tools/bison.simple +++ b/tools/bison.simple @@ -36,7 +36,7 @@ char *alloca (); #endif /* not HAVE_ALLOCA_H */ #endif /* not __GNUC__ */ -extern void yyerror(char* s); +extern void yyerror(const char* s); #ifndef alloca #ifdef __GNUC__