ClientTest.cpp: fix clang warning

SOURCE_ASSERT_EQUAL() expects to get an expression as first parameter
which may become NULL. Passing a known-non-NULL pointer makes no sense
and triggers a warning from clang:

ClientTestAssert.h:109:50: error: nonnull argument 'copy' compared to NULL
[-Werror=nonnull-compare]
 # define CT_ASSERT_TRUE_CLANG_BUILD(_expression) if (!(_expression)) {
 exit(1); }
...                                                  ^
ClientTest.cpp:859:5: note: in
expansion of macro 'SOURCE_ASSERT_EQUAL'
SOURCE_ASSERT_EQUAL(&copy, 0, config.m_dump(client, copy, copyFile));
This commit is contained in:
Patrick Ohly 2016-08-29 04:59:38 -07:00
parent a53e5289bd
commit bf3c8d5361
1 changed files with 1 additions and 1 deletions

View File

@ -856,7 +856,7 @@ bool LocalTests::compareDatabases(const char *refFile, TestingSyncSource &copy,
copyFile = getCurrentTest() + ".B.test.dat";
simplifyFilename(copyFile);
SOURCE_ASSERT_EQUAL(&copy, 0, config.m_dump(client, copy, copyFile));
CT_ASSERT_EQUAL(0, config.m_dump(client, copy, copyFile));
return compareDatabases(sourceFile, copyFile);
}