summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2023-01-09 00:39:09 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2023-01-13 00:37:36 -0500
commit782fa34775b4ec6c5884ec30efc4e45715f2e4fa (patch)
treeae727fed23a6468512f5dba19a2c341022f5d113
parent14f2d9db1364e107cf3fd870291fa245850111ca (diff)
downloadlighttpd-git-782fa34775b4ec6c5884ec30efc4e45715f2e4fa.tar.gz
[core] build configparser.y w/ -Werror workarounds
-rw-r--r--src/configparser.y14
-rw-r--r--src/lempar.c2
2 files changed, 15 insertions, 1 deletions
diff --git a/src/configparser.y b/src/configparser.y
index b078c58e..61c98a1c 100644
--- a/src/configparser.y
+++ b/src/configparser.y
@@ -3,6 +3,7 @@
%name configparser
%include {
+#define NDEBUG
#include "first.h"
#include "base.h"
#include "configfile.h"
@@ -17,6 +18,17 @@
#include <stdio.h>
#include <string.h>
+/*(missing declarations in generated configparser.c)*/
+static void configparserInit(void *yypRawParser);
+static void configparserFinalize(void *p);
+/*(missing declarations in generated configparser.c; defined but not used)*/
+static inline int configparserFallback(int iToken)
+ __attribute_unused__;
+#ifndef NDEBUG
+static inline void configparserTrace(FILE *TraceFILE, char *zTracePrompt)
+ __attribute_unused__;
+#endif
+
__attribute_pure__
static data_config * configparser_get_data_config(const array *a, const char *k, const size_t klen) {
return (data_config *)array_get_data_unset(a, k, klen);
@@ -384,7 +396,7 @@ metaline ::= EOL.
%destructor stringop { buffer_free($$); }
%token_type {buffer *}
-%token_destructor { buffer_free($$); }
+%token_destructor { buffer_free($$); UNUSED(ctx); }
varline ::= key(A) ASSIGN expression(B). {
if (ctx->ok) {
diff --git a/src/lempar.c b/src/lempar.c
index fcb72b8a..7f41be30 100644
--- a/src/lempar.c
+++ b/src/lempar.c
@@ -785,6 +785,8 @@ static void yy_syntax_error(
int yymajor, /* The major type of the error token */
ParseTOKENTYPE yyminor /* The minor type of the error token */
){
+ (void)yymajor;
+ (void)yyminor;
ParseARG_FETCH
ParseCTX_FETCH
#define TOKEN yyminor