Parcourir la source

[2198] Don't return anything from thread functions

Mukund Sivaraman il y a 12 ans
Parent
commit
1bb3279cc1

+ 1 - 3
src/lib/util/tests/interprocess_sync_file_unittest.cc

@@ -113,15 +113,13 @@ TEST(InterprocessSyncFileTest, TestLock) {
   EXPECT_EQ (0, unlink(TEST_DATA_TOPBUILDDIR "/test_lockfile"));
 }
 
-void*
+void
 threadTest(bool* locked)
 {
     InterprocessSyncFile sync2("test");
     InterprocessSyncLocker locker2(sync2);
 
     *locked = !locker2.tryLock();
-
-    return NULL;
 }
 
 TEST(InterprocessSyncFileTest, TestLockThreaded) {

+ 1 - 3
src/lib/util/threads/tests/lock_unittest.cc

@@ -46,7 +46,7 @@ TEST(MutexTest, lockMultiple) {
     EXPECT_TRUE(mutex2.locked()); // Debug-only build
 }
 
-void*
+void
 testThread(Mutex* mutex)
 {
     // block=false (tryLock).  This should not block indefinitely, but
@@ -57,8 +57,6 @@ testThread(Mutex* mutex)
     }, Mutex::Locker::AlreadyLocked);
 
     EXPECT_TRUE(mutex->locked()); // Debug-only build
-
-    return NULL;
 }
 
 // Test the non-blocking variant using a second thread.