diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/shell.c.in | 2 | ||||
-rw-r--r-- | src/sqliteInt.h | 10 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/shell.c.in b/src/shell.c.in index 1f98731aa..b33d6155e 100644 --- a/src/shell.c.in +++ b/src/shell.c.in @@ -856,7 +856,7 @@ static void appendText(ShellText *p, char const *zAppend, char quote){ } } - if( p->n+len>=p->nAlloc ){ + if( p->z==0 || p->n+len>=p->nAlloc ){ p->nAlloc = p->nAlloc*2 + len + 20; p->z = realloc(p->z, p->nAlloc); if( p->z==0 ) shell_out_of_memory(); diff --git a/src/sqliteInt.h b/src/sqliteInt.h index a7f830263..d941de07a 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -470,6 +470,14 @@ #endif /* +** Disable ALWAYS() and NEVER() (make them pass-throughs) for coverage +** and mutation testing +*/ +#if defined(SQLITE_COVERATE_TEST) || defined(SQLITE_MUTATION_TEST) +# define SQLITE_OMIT_AUXILIARY_SAFETY_CHECKS 1 +#endif + +/* ** The ALWAYS and NEVER macros surround boolean expressions which ** are intended to always be true or false, respectively. Such ** expressions could be omitted from the code completely. But they @@ -484,7 +492,7 @@ ** be true and false so that the unreachable code they specify will ** not be counted as untested code. */ -#if defined(SQLITE_COVERAGE_TEST) || defined(SQLITE_MUTATION_TEST) +#if defined(SQLITE_OMIT_AUXILIARY_SAFETY_CHECKS) # define ALWAYS(X) (1) # define NEVER(X) (0) #elif !defined(NDEBUG) |