From: Lauri Kasanen Date: Sun, 14 Apr 2019 16:45:53 +0000 (+0300) Subject: C90 param, void X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=654d97228835bed379b25cb967bf45d6673772c6;p=cc65 C90 param, void --- 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();