fixed build errors

This commit is contained in:
Sven Vogel 2024-05-14 13:28:05 +02:00
parent 5aa192871b
commit 4c61851a48
2 changed files with 7 additions and 6 deletions

View File

@ -8,7 +8,7 @@
int yylex();
extern int yyerror(char* s);
extern int yyerror(const char* s);
#define YY_USER_ACTION beginToken(yytext);

View File

@ -5,7 +5,7 @@
#include <sys/log.h>
#include <sys/col.h>
int yyerror(char*);
int yyerror(const char*);
extern char* buffer;
extern int yylineno;
@ -234,7 +234,7 @@ const char* ERROR = "error";
const char* WARNING = "warning";
const char* NOTE = "note";
int print_message(const char* kind, char* message) {
int print_message(const char* kind, const char* message) {
// number of characters written
int char_count = 0;
// highlight to use
@ -289,9 +289,10 @@ int print_message(const char* kind, char* message) {
}
char_count += printf("%s\n\n", RESET);
return char_count;
}
int yyerror(char *s) {
print_message(ERROR, s);
return 0;
int yyerror(const char *s) {
return print_message(ERROR, s);
}