From 9230c1d2dc9af55c573c54b64780a75cf418d896 Mon Sep 17 00:00:00 2001 From: thakis Date: Wed, 9 Dec 2015 16:36:25 -0800 Subject: clang/win: Let some chromium_code targets build with -Wextra. To make warning flags between Windows and non-Windows clang consistent, I'd like to build chromium_code targets with -Wextra enabled. This fixes -Wextra warnings in about 14k of 31k build steps. Most of the warnings were about signed/unsigned mismatches; some were about "const"s that had no effect. (This CL does not contain the change to actually turn on -Wextra, only cleanups.) BUG=567877 TBR=content/common/sandbox Review URL: https://codereview.chromium.org/1507413003 Cr-Commit-Position: refs/heads/master@{#364232} --- chrome_elf/blacklist/blacklist.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'chrome_elf') diff --git a/chrome_elf/blacklist/blacklist.cc b/chrome_elf/blacklist/blacklist.cc index 616c793..77aff7b 100644 --- a/chrome_elf/blacklist/blacklist.cc +++ b/chrome_elf/blacklist/blacklist.cc @@ -243,7 +243,9 @@ bool IsBlacklistInitialized() { } int GetBlacklistIndex(const wchar_t* dll_name) { - for (int i = 0; i < kTroublesomeDllsMaxCount && g_troublesome_dlls[i]; ++i) { + for (int i = 0; + i < static_cast(kTroublesomeDllsMaxCount) && g_troublesome_dlls[i]; + ++i) { if (_wcsicmp(dll_name, g_troublesome_dlls[i]) == 0) return i; } @@ -253,7 +255,7 @@ int GetBlacklistIndex(const wchar_t* dll_name) { bool AddDllToBlacklist(const wchar_t* dll_name) { int blacklist_size = BlacklistSize(); // We need to leave one space at the end for the null pointer. - if (blacklist_size + 1 >= kTroublesomeDllsMaxCount) + if (blacklist_size + 1 >= static_cast(kTroublesomeDllsMaxCount)) return false; for (int i = 0; i < blacklist_size; ++i) { if (!_wcsicmp(g_troublesome_dlls[i], dll_name)) -- cgit v1.1