Fix lempar.c so that Lemon can compile with NDEBUG defined.

[forum:/forumpost/f331adca0b|Forum post f331adca0b]

FossilOrigin-Name: ba4fb51853fbcb8c142a350b4db0d59153f28ba0a63ad9a2d6fea7096d3dd544
This commit is contained in:
drh 2021-11-09 01:48:15 +00:00
parent 90cf38be63
commit 4e86aa86ea
3 changed files with 9 additions and 9 deletions

View File

@ -1,5 +1,5 @@
C Refactor\sthe\scode\sthat\sfigures\sout\swhich\sSELECT\sin\sa\scascade\sof\snested\squeries\na\sparticular\saggregate\sfunction\sbelongs\sto.\s\sThis\sfixes\sthe\sproblem\nreported\sby\s[forum:/forumpost/c7cc2aa3546e39c1|forum\spost\sc7cc2aa3546e39c1].\nNew\stest\scases\sin\sdbsqlfuzz\sand\sth3.
D 2021-11-08T23:24:00.417
C Fix\slempar.c\sso\sthat\sLemon\scan\scompile\swith\sNDEBUG\sdefined.\n[forum:/forumpost/f331adca0b|Forum\spost\sf331adca0b]
D 2021-11-09T01:48:15.568
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@ -1851,7 +1851,7 @@ F tool/getlock.c f4c39b651370156cae979501a7b156bdba50e7ce
F tool/index_usage.c f62a0c701b2c7ff2f3e21d206f093c123f222dbf07136a10ffd1ca15a5c706c5
F tool/kvtest-speed.sh 4761a9c4b3530907562314d7757995787f7aef8f
F tool/lemon.c 258881835bd5bccd0c74fb110fe54244ff18e8e7ef3d949cbdab7187f02132bb
F tool/lempar.c 7d4b1c863a6c7f75f0a04bfa7000b7388898c9ee9c906adc675bc40590ad0abe
F tool/lempar.c 57478ea48420da05faa873c6d1616321caa5464644588c97fbe8e0ea04450748
F tool/libvers.c caafc3b689638a1d88d44bc5f526c2278760d9b9
F tool/loadfts.c c3c64e4d5e90e8ba41159232c2189dba4be7b862
F tool/logest.c 11346aa019e2e77a00902aa7d0cabd27bd2e8cca
@ -1932,7 +1932,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P bc401a75dd9f3c29c5969ae36264e68ccefc0937e44e232ca1f6b550f7fd6e22
R 39b8c22200792487bab0b61ad66853dd
P 74aec5dd1df95b5635f4da1f13753f113ea1d61de3dc3a1523ba51089c1900e4
R 925cf5395b8a97a099d37adde7db5eb4
U drh
Z c1621993dac1862e5659d8b61900625a
Z 9cd7239f131956f4eba0564446f661b7

View File

@ -1 +1 @@
74aec5dd1df95b5635f4da1f13753f113ea1d61de3dc3a1523ba51089c1900e4
ba4fb51853fbcb8c142a350b4db0d59153f28ba0a63ad9a2d6fea7096d3dd544

View File

@ -223,9 +223,9 @@ struct yyParser {
};
typedef struct yyParser yyParser;
#include <assert.h>
#ifndef NDEBUG
#include <stdio.h>
#include <assert.h>
static FILE *yyTraceFILE = 0;
static char *yyTracePrompt = 0;
#endif /* NDEBUG */
@ -882,8 +882,8 @@ void Parse(
yyact = yy_find_shift_action((YYCODETYPE)yymajor,yyact);
if( yyact >= YY_MIN_REDUCE ){
unsigned int yyruleno = yyact - YY_MIN_REDUCE; /* Reduce by this rule */
assert( yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) );
#ifndef NDEBUG
assert( yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) );
if( yyTraceFILE ){
int yysize = yyRuleInfoNRhs[yyruleno];
if( yysize ){