Berry remove re1.5 compilation warnings

This commit is contained in:
Stephan Hadinger 2021-12-14 20:08:27 +01:00
parent 6a1090c876
commit b1162a8e1c
3 changed files with 7 additions and 4 deletions

View File

@ -5,7 +5,7 @@
#include "re1.5.h"
struct {
char *name;
const char *name;
int (*fn)(ByteProg*, Subject*, const char**, int, int);
} tab[] = {
{"recursive", re1_5_recursiveprog},

View File

@ -46,7 +46,7 @@ Regexp *parse(char*);
Regexp *reg(int type, Regexp *left, Regexp *right);
void printre(Regexp*);
#ifndef re1_5_fatal
void re1_5_fatal(char*);
void re1_5_fatal(const char*);
#endif
#ifndef re1_5_stack_chk
#define re1_5_stack_chk()

View File

@ -4,10 +4,13 @@
#include "re1.5.h"
extern void berry_log_C(const char * berry_buf, ...);
void
re1_5_fatal(char *msg)
re1_5_fatal(const char *msg)
{
fprintf(stderr, "fatal error: %s\n", msg);
berry_log_C("BRY: regex fatal error: %s", msg);
// fprintf(stderr, "fatal error: %s\n", msg);
exit(2);
}