lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nwelln...@apache.org
Subject [lucy-commits] [4/4] git commit: refs/heads/master - Fix unused variable warnings in lemon-generated code
Date Sun, 19 May 2013 15:44:24 GMT
Fix unused variable warnings in lemon-generated code


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/94899bc3
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/94899bc3
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/94899bc3

Branch: refs/heads/master
Commit: 94899bc38033195c5e7e98dd6478a2d957ec8eda
Parents: a12df8e
Author: Nick Wellnhofer <wellnhofer@aevum.de>
Authored: Sun May 19 17:42:07 2013 +0200
Committer: Nick Wellnhofer <wellnhofer@aevum.de>
Committed: Sun May 19 17:42:07 2013 +0200

----------------------------------------------------------------------
 clownfish/compiler/src/CFCParseHeader.y |    2 ++
 core/Lucy/Util/Json/JsonParser.y        |    2 ++
 lemon/lempar.c                          |   10 ++++------
 3 files changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/94899bc3/clownfish/compiler/src/CFCParseHeader.y
----------------------------------------------------------------------
diff --git a/clownfish/compiler/src/CFCParseHeader.y b/clownfish/compiler/src/CFCParseHeader.y
index 67a3c56..9b14db5 100644
--- a/clownfish/compiler/src/CFCParseHeader.y
+++ b/clownfish/compiler/src/CFCParseHeader.y
@@ -206,6 +206,8 @@ S_new_type(CFCParser *state, int flags, char *type_name,
 } /* End include block. */
 
 %syntax_error {
+    (void)yymajor;
+    (void)yyminor;
     CFCParser_set_errors(state, true);
 }
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/94899bc3/core/Lucy/Util/Json/JsonParser.y
----------------------------------------------------------------------
diff --git a/core/Lucy/Util/Json/JsonParser.y b/core/Lucy/Util/Json/JsonParser.y
index 2d9cf03..15e4048 100644
--- a/core/Lucy/Util/Json/JsonParser.y
+++ b/core/Lucy/Util/Json/JsonParser.y
@@ -34,6 +34,8 @@
 %extra_argument { lucy_JsonParserState *state }
 
 %syntax_error {
+    (void)yymajor;
+    (void)yyminor;
     state->errors = true;
 }
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/94899bc3/lemon/lempar.c
----------------------------------------------------------------------
diff --git a/lemon/lempar.c b/lemon/lempar.c
index fe56d2d..fa0942e 100644
--- a/lemon/lempar.c
+++ b/lemon/lempar.c
@@ -473,7 +473,7 @@ static int yy_find_reduce_action(
 /*
 ** The following routine is called if the stack overflows.
 */
-static void yyStackOverflow(yyParser *yypParser, YYMINORTYPE *yypMinor){
+static void yyStackOverflow(yyParser *yypParser){
    ParseARG_FETCH;
    yypParser->yyidx--;
 #ifndef NDEBUG
@@ -506,14 +506,14 @@ static void yy_shift(
 #endif
 #if YYSTACKDEPTH>0 
   if( yypParser->yyidx>=YYSTACKDEPTH ){
-    yyStackOverflow(yypParser, yypMinor);
+    yyStackOverflow(yypParser);
     return;
   }
 #else
   if( yypParser->yyidx>=yypParser->yystksz ){
     yyGrowStack(yypParser);
     if( yypParser->yyidx>=yypParser->yystksz ){
-      yyStackOverflow(yypParser, yypMinor);
+      yyStackOverflow(yypParser);
       return;
     }
   }
@@ -717,9 +717,7 @@ void Parse(
   if( yypParser->yyidx<0 ){
 #if YYSTACKDEPTH<=0
     if( yypParser->yystksz <=0 ){
-      /*memset(&yyminorunion, 0, sizeof(yyminorunion));*/
-      yyminorunion = yyzerominor;
-      yyStackOverflow(yypParser, &yyminorunion);
+      yyStackOverflow(yypParser);
       return;
     }
 #endif


Mime
View raw message