aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2016-02-06 22:32:06 +0000
committerdrh <drh@noemail.net>2016-02-06 22:32:06 +0000
commitcc5f8a46b975d5afb86bfbe2da2ee7f2d85d7572 (patch)
tree2f4f298a726bba28cc67d528a596b24c2adda3e5 /src/main.c
parentf5818aa560fc463e241bbeeaefba8cfacdd0131f (diff)
downloadsqlite-cc5f8a46b975d5afb86bfbe2da2ee7f2d85d7572.tar.gz
sqlite-cc5f8a46b975d5afb86bfbe2da2ee7f2d85d7572.zip
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
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 588461b48..922af1315 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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;
}