mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1220544 - Fix -Wunreachable-code warnings in xpcom. r=mccr8
xpcom/glue/PLDHashTable.cpp:471:10 [-Wunreachable-code-return] 'return' will never be executed xpcom/tests/TestAutoPtr.cpp:324:9 [-Wunreachable-code] code will never be executed xpcom/tests/TestBlockingProcess.cpp:6:11 [-Wunreachable-code-return] 'return' will never be executed
This commit is contained in:
parent
d30d4ac16e
commit
5854131a01
@ -468,7 +468,6 @@ PLDHashTable::FindFreeEntry(PLDHashNumber aKeyHash)
|
||||
}
|
||||
|
||||
// NOTREACHED
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool
|
||||
@ -846,4 +845,3 @@ PLDHashTable::MarkImmutable()
|
||||
mChecker.SetNonWritable();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -319,8 +319,10 @@ int main()
|
||||
|
||||
printf("\nTesting casts and equality tests.\n");
|
||||
|
||||
if ((void*)(TestObject*)0x1000 ==
|
||||
(void*)(TestObjectBaseB*)(TestObject*)0x1000)
|
||||
// This comparison is always false, as it should be. The extra parens
|
||||
// suppress a -Wunreachable-code warning about printf being unreachable.
|
||||
if (((void*)(TestObject*)0x1000) ==
|
||||
((void*)(TestObjectBaseB*)(TestObject*)0x1000))
|
||||
printf("\n\nAll these tests are meaningless!\n\n\n");
|
||||
|
||||
{
|
||||
@ -395,7 +397,6 @@ int main()
|
||||
printf("Should destroy one |TestRefObject|:\n");
|
||||
}
|
||||
|
||||
|
||||
printf("\nTesting construction.\n");
|
||||
|
||||
{
|
||||
|
@ -1,8 +1,6 @@
|
||||
#include <prthread.h>
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
while(1) PR_Sleep(PR_SecondsToInterval(10));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user