diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2023-05-15 01:22:08 -0400 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2023-05-15 01:23:53 -0400 |
commit | b6c99696baa70461b3ce2f69674ab5b11f583131 (patch) | |
tree | 89da402bb015f24abe055012d9528e64263d6425 | |
parent | a14a93e1fa7a3e3b34febd23b6eb3e97c4cca868 (diff) | |
download | lighttpd-git-master.tar.gz |
[core] quiet lemon.c clang C2x warningsHEADpersonal/gstrauss/mastermaster
-rw-r--r-- | src/lemon.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lemon.c b/src/lemon.c index 4b5c87ac..02390839 100644 --- a/src/lemon.c +++ b/src/lemon.c @@ -52,7 +52,7 @@ extern int access(const char *path, int mode); #define MAXRHS 1000 #endif -extern void memory_error(); +extern void memory_error(void); static int showPrecedenceConflict = 0; static char *msort(char*,char**,int(*)(const char*,const char*)); @@ -202,7 +202,7 @@ struct s_options { enum option_type type; const char *label; char *arg; - void(*fn)(); + void(*fn)(char *); const char *message; }; int OptInit(char**,struct s_options*,FILE*); @@ -435,7 +435,7 @@ struct lemon { }; #define MemoryCheck(X) if((X)==0){ \ - extern void memory_error(); \ + extern void memory_error(void); \ memory_error(); \ } @@ -1999,7 +1999,7 @@ static int handleflags(int i, FILE *err) }else if( op[j].type==OPT_FLAG ){ *((int*)op[j].arg) = v; }else if( op[j].type==OPT_FFLAG ){ - op[j].fn(v); + ((void(*)(int))op[j].fn)(v); }else if( op[j].type==OPT_FSTR ){ op[j].fn(&g_argv[i][2]); }else{ @@ -2083,13 +2083,13 @@ static int handleswitch(int i, FILE *err) *(double*)(op[j].arg) = dv; break; case OPT_FDBL: - op[j].fn(dv); + ((void(*)(double))op[j].fn)(dv); break; case OPT_INT: *(int*)(op[j].arg) = lv; break; case OPT_FINT: - op[j].fn((int)lv); + ((void(*)(int))op[j].fn)((int)lv); break; case OPT_STR: *(char**)(op[j].arg) = sv; @@ -5560,7 +5560,7 @@ struct symbol *Symbol_Nth(int n) } /* Return the size of the array */ -int Symbol_count() +int Symbol_count(void) { return x2a ? x2a->count : 0; } @@ -5568,7 +5568,7 @@ int Symbol_count() /* Return an array of pointers to all data in the table. ** The array is obtained from malloc. Return NULL if memory allocation ** problems, or if the array is empty. */ -struct symbol **Symbol_arrayof() +struct symbol **Symbol_arrayof(void) { struct symbol **array; int i,arrSize; @@ -5619,7 +5619,7 @@ PRIVATE unsigned statehash(struct config *a) } /* Allocate a new state structure */ -struct state *State_new() +struct state *State_new(void) { struct state *newstate; newstate = (struct state *)calloc(1, sizeof(struct state) ); |