Skip to content

Commit

Permalink
Fix an error for cannot initialize return object of type 'enum yytoke…
Browse files Browse the repository at this point in the history
…ntype' with an rvalue of type 'int'

```
error: cannot initialize return object of type 'enum yytokentype' with an rvalue of type 'int'
    return 0;
           ^
1 error generated.
```
  • Loading branch information
ydah committed Aug 9, 2024
1 parent a11ea64 commit fc218f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sample/parse.y
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ factor : number
static enum yytokentype
yylex(YYSTYPE *lval)
{
return 0;
return (enum yytokentype)0;
}

static void yyerror(YYLTYPE *yylloc, const char *msg)
Expand Down

0 comments on commit fc218f4

Please sign in to comment.