From 1c177dcb39e7dbdd5156f496ee86f08ffd897e7c Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 14 Sep 2022 20:23:48 -0400 Subject: [PATCH] a couple of inconsistencies make pmatchregex regex_error_desc return type match cppregex.cpp and posixregex.c make the extern declaration for loadsyms[] in options.c match the one in symbols.c. --- src/options.c | 2 +- sys/share/pmatchregex.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/options.c b/src/options.c index 31729d08d..526244e93 100644 --- a/src/options.c +++ b/src/options.c @@ -95,7 +95,7 @@ static struct allopt_t allopt[SIZE(allopt_init)]; /* use rest of file */ extern char configfile[]; /* for messages */ -extern struct symparse loadsyms[]; +extern const struct symparse loadsyms[]; #if defined(TOS) && defined(TEXTCOLOR) extern boolean colors_changed; /* in tos.c */ #endif diff --git a/sys/share/pmatchregex.c b/sys/share/pmatchregex.c index 0cf477a8c..95dc4de11 100644 --- a/sys/share/pmatchregex.c +++ b/sys/share/pmatchregex.c @@ -41,7 +41,7 @@ regex_compile(const char *s, struct nhregex *re) return TRUE; } -const char * +char * regex_error_desc(struct nhregex *re UNUSED, char *errbuf) { return strcpy(errbuf, "pattern match compilation error");