1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Add a utility program that looks for assert(), NEVER(), ALWAYS(), and

testcase() macros that have side-effects, and reports errors when they are
found.  Also fix a bug that this utility detected as it was being tested.

FossilOrigin-Name: b0b4624fc5d53bb0cc9fae7dad51984837d946ac
This commit is contained in:
drh
2016-02-06 22:32:06 +00:00
parent f5818aa560
commit cc5f8a46b9
7 changed files with 192 additions and 19 deletions

View File

@@ -3566,7 +3566,7 @@ int sqlite3_test_control(int op, ...){
*/
case SQLITE_TESTCTRL_ASSERT: {
volatile int x = 0;
assert( (x = va_arg(ap,int))!=0 );
assert( /*side-effects-ok*/ (x = va_arg(ap,int))!=0 );
rc = x;
break;
}