diff --git a/src/build.c b/src/build.c index 6cdf98f..9e510b8 100644 --- a/src/build.c +++ b/src/build.c @@ -436,7 +436,7 @@ build(void) if (fflush(newrefs) == EOF) { /* rewind doesn't check for write failure */ cannotwrite(newreffile); - /* falseTREACHED */ + /* NOTREACHED */ } /* create the inverted index if requested */ @@ -445,7 +445,7 @@ build(void) if (fflush(postings) == EOF) { cannotwrite(temp1); - /* falseTREACHED */ + /* NOTREACHED */ } fstat(fileno(postings), &statstruct); fclose(postings); @@ -499,11 +499,11 @@ seek_to_trailer(FILE *f) { if (fscanf(f, "%ld", &traileroffset) != 1) { postfatal(PROGRAM_NAME ": cannot read trailer offset from file %s\n", reffile); - /* falseTREACHED */ + /* NOTREACHED */ } if (fseek(f, traileroffset, SEEK_SET) == -1) { postfatal(PROGRAM_NAME ": cannot seek to trailer in file %s\n", reffile); - /* falseTREACHED */ + /* NOTREACHED */ } } @@ -586,7 +586,7 @@ putlist(char **names, int count) if (fputs(names[i], newrefs) == EOF || putc('\n', newrefs) == EOF) { cannotwrite(newreffile); - /* falseTREACHED */ + /* NOTREACHED */ } } } @@ -716,7 +716,7 @@ movefile(char *new, char *old) myperror(PROGRAM_NAME); postfatal(PROGRAM_NAME ": cannot rename file %s to file %s\n", new, old); - /* falseTREACHED */ + /* NOTREACHED */ } } diff --git a/src/crossref.c b/src/crossref.c index 0bc0c6c..40ef770 100644 --- a/src/crossref.c +++ b/src/crossref.c @@ -220,7 +220,7 @@ putfilename(char *srcfile) /* note: dbputc is not used to avoid lint complaint */ if (putc(NEWFILE, newrefs) == EOF) { cannotwrite(newreffile); - /* falseTREACHED */ + /* NOTREACHED */ } ++dboffset; if (invertedindex == true) { @@ -450,7 +450,7 @@ putposting(char *term, int type) } if (putc('\n', postings) == EOF) { cannotwrite(temp1); - /* falseTREACHED */ + /* NOTREACHED */ } ++npostings; } diff --git a/src/exec.c b/src/exec.c index 3e28bdb..6e8e75d 100644 --- a/src/exec.c +++ b/src/exec.c @@ -114,7 +114,7 @@ myexecvp(char *a, char **args) perror(msg); /* display the reason */ askforreturn(); /* wait until the user sees the message */ myexit(1); /* exit the child */ - /* falseTREACHED */ + /* NOTREACHED */ return 0; } diff --git a/src/find.c b/src/find.c index 92670ff..3515b26 100644 --- a/src/find.c +++ b/src/find.c @@ -926,7 +926,7 @@ putsource(int seemore, FILE *output) if (*blockp != '\n' || getrefchar() != '\n' || (!isdigit(getrefchar()) && fileversion >= 12)) { postfatal("Internal error: cannot get source line from database"); - /* falseTREACHED */ + /* NOTREACHED */ } /* until a double newline is found */ do { diff --git a/src/fscanner.l b/src/fscanner.l index 20f5dba..c8505d8 100644 --- a/src/fscanner.l +++ b/src/fscanner.l @@ -119,12 +119,12 @@ wsnl [ \t\r\v\f\n]|{comment} %\{ { /* lex/yacc C declarations/definitions */ global = true; goto more; - /* falseTREACHED */ + /* NOTREACHED */ } %\} { global = false; goto more; - /* falseTREACHED */ + /* NOTREACHED */ } ^%% { /* lex/yacc rules delimiter */ braces = 0; @@ -161,7 +161,7 @@ wsnl [ \t\r\v\f\n]|{comment} last = first; my_yymore(); return(FCNEND); - /* falseTREACHED */ + /* NOTREACHED */ } } @@ -170,11 +170,11 @@ wsnl [ \t\r\v\f\n]|{comment} fcndef = true; token = FCNDEF; goto findident; - /* falseTREACHED */ + /* NOTREACHED */ } ENDSTATE[ \t] { /* end of an sdl state, treat as end of a function */ goto endstate; - /* falseTREACHED */ + /* NOTREACHED */ } \{ { /* count unmatched left braces for fcn def detection */ @@ -193,7 +193,7 @@ wsnl [ \t\r\v\f\n]|{comment} return(token); } goto more; - /* falseTREACHED */ + /* NOTREACHED */ } \#{ws}* { /* start a preprocessor line */ @@ -201,7 +201,7 @@ wsnl [ \t\r\v\f\n]|{comment} BEGIN(IN_PREPROC); yyleng = 1; /* get rid of the blanks, if any */ goto more; - /* falseTREACHED */ + /* NOTREACHED */ } endif([^a-zA-Z0-9_$\n].*)? { /* #endif */ /* delay treatment of #endif depending on whether an @@ -210,7 +210,7 @@ wsnl [ \t\r\v\f\n]|{comment} * after the #endif */ BEGIN(WAS_ENDIF); goto more; - /* falseTREACHED */ + /* NOTREACHED */ } \n{wsnl}*#{ws}*if(ndef|def)?{ws}+ { /* attempt to correct erroneous brace count caused by: @@ -225,14 +225,14 @@ wsnl [ \t\r\v\f\n]|{comment} /* the current #if must not have an #else or #elif */ if (elseelif == true) { goto endif; - /* falseTREACHED */ + /* NOTREACHED */ } pseudoelif = true; BEGIN(INITIAL); yyless(1); /* rescan all but the line ending */ yy_set_bol(1); goto eol; - /* falseTREACHED */ + /* NOTREACHED */ } \n{wsnl}* { /* an #endif with no #if right after it */ endif: @@ -246,7 +246,7 @@ wsnl [ \t\r\v\f\n]|{comment} yyless(1); yy_set_bol(1); goto eol; - /* falseTREACHED */ + /* NOTREACHED */ } ifndef{ws}+ | @@ -256,7 +256,7 @@ wsnl [ \t\r\v\f\n]|{comment} if (pseudoelif == true) { pseudoelif = false; goto elif; - /* falseTREACHED */ + /* NOTREACHED */ } /* make sure there is room for the current brace count */ if (iflevel == miflevel) { @@ -269,7 +269,7 @@ wsnl [ \t\r\v\f\n]|{comment} maxifbraces[iflevel++] = 0; BEGIN(INITIAL); goto more; - /* falseTREACHED */ + /* NOTREACHED */ } else({ws}.*)? { /* #else --- eat up whole line */ elseelif = true; @@ -284,7 +284,7 @@ wsnl [ \t\r\v\f\n]|{comment} } BEGIN(INITIAL); goto more; - /* falseTREACHED */ + /* NOTREACHED */ } elif{ws}+ { /* #elif */ /* elseelif = true; --- HBB I doubt this is correct */ @@ -300,7 +300,7 @@ wsnl [ \t\r\v\f\n]|{comment} } BEGIN(INITIAL); goto more; - /* falseTREACHED */ + /* NOTREACHED */ } include{ws}*\"[^"\n]+\" | @@ -322,7 +322,7 @@ wsnl [ \t\r\v\f\n]|{comment} } BEGIN(INITIAL); return(INCLUDE); - /* falseTREACHED */ + /* NOTREACHED */ } \} { @@ -351,13 +351,13 @@ wsnl [ \t\r\v\f\n]|{comment} } } goto more; - /* falseTREACHED */ + /* NOTREACHED */ } \( { /* count unmatched left parentheses for function templates */ ++parens; goto more; - /* falseTREACHED */ + /* NOTREACHED */ } \) { if (--parens <= 0) { @@ -369,7 +369,7 @@ wsnl [ \t\r\v\f\n]|{comment} template = false; } goto more; - /* falseTREACHED */ + /* NOTREACHED */ } = { /* if a global definition initializer */ if (!my_yytext) @@ -379,7 +379,7 @@ wsnl [ \t\r\v\f\n]|{comment} initializer = true; } goto more; - /* falseTREACHED */ + /* NOTREACHED */ } : { /* a if global structure field */ if (!my_yytext) @@ -388,7 +388,7 @@ wsnl [ \t\r\v\f\n]|{comment} structfield = true; } goto more; - /* falseTREACHED */ + /* NOTREACHED */ } \, { if (braces == initializerbraces) { @@ -397,7 +397,7 @@ wsnl [ \t\r\v\f\n]|{comment} } structfield = false; goto more; - /* falseTREACHED */ + /* NOTREACHED */ } ; { /* if the enum/struct/union was not a definition */ if (braces == 0) { @@ -415,7 +415,7 @@ wsnl [ \t\r\v\f\n]|{comment} structfield = false; initializer = false; goto more; - /* falseTREACHED */ + /* NOTREACHED */ } define{ws}+{identifier} { @@ -438,19 +438,19 @@ wsnl [ \t\r\v\f\n]|{comment} last = my_yyleng; BEGIN(INITIAL); goto definition; - /* falseTREACHED */ + /* NOTREACHED */ } \n { /* unknown preprocessor line */ BEGIN(INITIAL); ++myylineno; goto more; - /* falseTREACHED */ + /* NOTREACHED */ } . | {identifier} { /* unknown preprocessor line */ BEGIN(INITIAL); goto more; - /* falseTREACHED */ + /* NOTREACHED */ } class{wsnl}+{identifier}({wsnl}|{identifier}|[():])*\{ { /* class definition */ @@ -459,7 +459,7 @@ class{wsnl}+{identifier}({wsnl}|{identifier}|[():])*\{ { /* class definition */ yyless(5); /* eat up 'class', and re-scan */ yy_set_bol(0); goto more; - /* falseTREACHED */ + /* NOTREACHED */ } ("enum"|"struct"|"union") { @@ -501,7 +501,7 @@ if{wsnl}*\( { /* ignore 'if' */ BEGIN(WAS_IDENTIFIER); ident_start = first; goto more; - /* falseTREACHED */ + /* NOTREACHED */ } { @@ -522,16 +522,16 @@ if{wsnl}*\( { /* ignore 'if' */ fcndef = true; token = FCNDEF; goto fcn; - /* falseTREACHED */ + /* NOTREACHED */ } goto fcncal; - /* falseTREACHED */ + /* NOTREACHED */ } {ws}*\(([*&[\]=,.]|{identifier}|{number}|{wsnl})* { /* function call */ fcncal: if (fcndef == true || ppdefine == true || rules == true) { token = FCNCALL; goto fcn; - /* falseTREACHED */ + /* NOTREACHED */ } if (template == false) { templateparens = parens;