From 654d97228835bed379b25cb967bf45d6673772c6 Mon Sep 17 00:00:00 2001 From: Lauri Kasanen Date: Sun, 14 Apr 2019 19:45:53 +0300 Subject: [PATCH 1/1] C90 param, void --- src/cc65/expr.c | 3 ++- test/val/computedgoto.c | 2 +- test/val/jmp-callax.c | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/cc65/expr.c b/src/cc65/expr.c index fad1c9514..e6522f949 100644 --- a/src/cc65/expr.c +++ b/src/cc65/expr.c @@ -699,8 +699,9 @@ static void Primary (ExprDesc* E) case TOK_BOOL_AND: /* A computed goto label address */ if (IS_Get (&Standard) >= STD_CC65) { + SymEntry* Entry; NextToken (); - SymEntry* Entry = AddLabelSym (CurTok.Ident, SC_REF | SC_GOTO_IND); + Entry = AddLabelSym (CurTok.Ident, SC_REF | SC_GOTO_IND); /* output its label */ E->Flags = E_RTYPE_RVAL | E_LOC_STATIC; E->Name = Entry->V.L.Label; diff --git a/test/val/computedgoto.c b/test/val/computedgoto.c index f7a4e28ec..f8ab7c05f 100644 --- a/test/val/computedgoto.c +++ b/test/val/computedgoto.c @@ -43,7 +43,7 @@ static void act(const unsigned char op) { return; } -int main() { +int main(void) { val = val2 = 0; diff --git a/test/val/jmp-callax.c b/test/val/jmp-callax.c index 224b89251..35d3db6b6 100644 --- a/test/val/jmp-callax.c +++ b/test/val/jmp-callax.c @@ -4,7 +4,7 @@ static void foo(void) { val = 5; } -static void wrap() { +static void wrap(void) { asm("lda #<%v", foo); asm("ldx #>%v", foo); @@ -12,7 +12,7 @@ static void wrap() { } -int main() { +int main(void) { val = 0; wrap(); -- 2.39.2