From fc218f4a2ba5358521e58cf968889ebae5e3fe3f Mon Sep 17 00:00:00 2001 From: ydah Date: Fri, 9 Aug 2024 22:24:31 +0900 Subject: [PATCH] Fix an error for cannot initialize return object of type 'enum yytokentype' 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. ``` --- sample/parse.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sample/parse.y b/sample/parse.y index 2f6f238d..813a73aa 100644 --- a/sample/parse.y +++ b/sample/parse.y @@ -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)