Skip to content

Commit

Permalink
valgrind Conditional jump or move depends on uninitialised value warn…
Browse files Browse the repository at this point in the history
…ing.
  • Loading branch information
ksherlock committed Dec 26, 2015
1 parent 97a0338 commit 41ddc64
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lempar.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ void *ParseAlloc(void *(*mallocProc)(YYMALLOCARGTYPE)){
yyParser *pParser;
pParser = (yyParser*)(*mallocProc)( (YYMALLOCARGTYPE)sizeof(yyParser) );
if( pParser ){
memset(pParser, 0, sizeof(yyParser));
pParser->yyidx = -1;
#ifdef YYTRACKMAXSTACKDEPTH
pParser->yyidxMax = 0;
Expand Down
1 change: 1 addition & 0 deletions lempar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,7 @@ void *ParseAlloc(void *(*mallocProc)(YYMALLOCARGTYPE)){
yyParser *pParser;
pParser = (yyParser*)(*mallocProc)( (YYMALLOCARGTYPE)sizeof(yyParser) );
if( pParser ){
memset(pParser, 0, sizeof(yyParser));
pParser->yyidx = -1;
#ifdef YYTRACKMAXSTACKDEPTH
pParser->yyidxMax = 0;
Expand Down

0 comments on commit 41ddc64

Please sign in to comment.