Commit 702b377e authored by Hans Wennborg's avatar Hans Wennborg Committed by Commit Bot

Fix -Wtautological-bitwise-compare warning in ProfileInfoCacheTest

The binary or operator meant the if conditions were always true, and recent
Clang versions warn about it. This patch makes the code match the comments.

Bug: 1024203
Change-Id: Ie4716dadc40a43f8f97e26ee04745cf967fc98f6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1912718
Auto-Submit: Hans Wennborg <hans@chromium.org>
Commit-Queue: David Roger <droger@chromium.org>
Reviewed-by: default avatarDavid Roger <droger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#715319}
parent 723e9b31
...@@ -746,7 +746,7 @@ TEST_F(ProfileInfoCacheTest, EntriesInAttributesStorage) { ...@@ -746,7 +746,7 @@ TEST_F(ProfileInfoCacheTest, EntriesInAttributesStorage) {
// Use ProfileInfoCache in profiles 0 and 2, and ProfileAttributesStorage in // Use ProfileInfoCache in profiles 0 and 2, and ProfileAttributesStorage in
// profiles 1 and 3. // profiles 1 and 3.
if (i | 1u) { if (i == 0 || i == 2) {
GetCache()->AddProfileToCache(profile_path, profile_name, std::string(), GetCache()->AddProfileToCache(profile_path, profile_name, std::string(),
base::string16(), false, i, "", base::string16(), false, i, "",
EmptyAccountId()); EmptyAccountId());
...@@ -780,7 +780,7 @@ TEST_F(ProfileInfoCacheTest, EntriesInAttributesStorage) { ...@@ -780,7 +780,7 @@ TEST_F(ProfileInfoCacheTest, EntriesInAttributesStorage) {
// Use ProfileInfoCache in profiles 0 and 1, and ProfileAttributesStorage in // Use ProfileInfoCache in profiles 0 and 1, and ProfileAttributesStorage in
// profiles 2 and 3. // profiles 2 and 3.
if (i | 2u) if (i == 0 || i == 1)
GetCache()->DeleteProfileFromCache(profile_path); GetCache()->DeleteProfileFromCache(profile_path);
else else
GetCache()->RemoveProfile(profile_path); GetCache()->RemoveProfile(profile_path);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment