Bug 1102804 - Fixed -Wparentheses warnings found in mingw build (toolkit part). r=roc

This commit is contained in:
Jacek Caban 2014-11-27 10:59:26 +01:00
parent dd8a8e94a3
commit d127574c6c
2 changed files with 5 additions and 6 deletions

View File

@ -555,7 +555,7 @@ bool
nsDownloadScanner::Scan::CheckAndSetState(AVScanState newState, AVScanState expectedState) {
bool gotExpectedState = false;
EnterCriticalSection(&mStateSync);
if(gotExpectedState = (mStatus == expectedState))
if((gotExpectedState = (mStatus == expectedState)))
mStatus = newState;
LeaveCriticalSection(&mStateSync);
return gotExpectedState;
@ -663,10 +663,10 @@ nsDownloadScannerWatchdog::WatchdogThread(void *p) {
DWORD queueItemsLeft = 0;
// Loop until quit event or error
while (0 != queueItemsLeft ||
(WAIT_OBJECT_0 + 1) !=
((WAIT_OBJECT_0 + 1) !=
(waitStatus =
WaitForMultipleObjects(2, waitHandles, FALSE, INFINITE)) &&
waitStatus != WAIT_FAILED) {
waitStatus != WAIT_FAILED)) {
Scan *scan = nullptr;
PRTime startTime, expectedEndTime, now;
DWORD waitTime;

View File

@ -165,8 +165,7 @@ int wmain(int argc, wchar_t *argv[])
int i;
int rv = 0;
if (argc > 1 && (_wcsicmp(argv[1], L"-check-one") != 0 ||
_wcsicmp(argv[1], L"-check-one") == 0 && argc != 3)) {
if (argc > 1 && (_wcsicmp(argv[1], L"-check-one") != 0 || argc != 3)) {
fwprintf(stderr, L"Displays and validates output from MakeCommandLine.\n\n");
fwprintf(stderr, L"Usage: %s -check-one <test number>\n\n", argv[0]);
fwprintf(stderr, L" <test number>\tSpecifies the test number to run from the\n");
@ -206,7 +205,7 @@ int wmain(int argc, wchar_t *argv[])
if (!GetPrivateProfileStringW(L"MakeCommandLineTests", sInputKey, nullptr,
sInputVal, MAXPATHLEN, inifile)) {
if (i == 0 || argc > 2 && _wcsicmp(argv[1], L"-check-one") == 0) {
if (i == 0 || (argc > 2 && _wcsicmp(argv[1], L"-check-one") == 0)) {
wprintf(L"TEST-UNEXPECTED-FAIL | %s | see following explanation:\n", TEST_NAME);
wprintf(L"ERROR: Either the TestXREMakeCommandLineWin.ini file doesn't exist\n");
if (argc > 1 && _wcsicmp(argv[1], L"-check-one") == 0 && argc == 3) {