Skip to content

Commit 6042533

Browse files
r-barnesmeta-codesync[bot]
authored andcommitted
Enable -Wstring-conversion in folly/PACKAGE +1
Summary: This diff enables compilation warning flags for the directory in question. Further details are in [this workplace post](https://fb.workplace.com/permalink.php?story_fbid=pfbid02XaWNiCVk69r1ghfvDVpujB8Hr9Y61uDvNakxiZFa2jwiPHscVdEQwCBHrmWZSyMRl&id=100051201402394). This is a low-risk diff. There are **no run-time effects** and the diff has already been observed to compile locally. **If the code compiles, it work; test errors are spurious.** Differential Revision: D92431440 fbshipit-source-id: de0b00835d823253acf6070b21a5a4ecf9d907d8
1 parent b32a10b commit 6042533

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

folly/test/AtomicHashArrayTest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ void testMap() {
113113
ref.insert(e);
114114
EXPECT_EQ(ref.size(), arr->size());
115115
if (ret.first == arr->end()) {
116-
EXPECT_FALSE("AHA should not have run out of space.");
116+
EXPECT_TRUE(false && "AHA should not have run out of space.");
117117
continue;
118118
}
119119
EXPECT_EQ(e.first, ret.first->first);
@@ -140,7 +140,7 @@ void testMap() {
140140
for (const auto& e : ref) {
141141
auto ret = arr->find(e.first);
142142
if (ret == arr->end()) {
143-
EXPECT_FALSE("Key was not in AHA");
143+
EXPECT_TRUE(false && "Key was not in AHA");
144144
continue;
145145
}
146146
EXPECT_EQ(e.first, ret->first);

folly/test/AtomicHashMapTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ void raceIterateThread(std::atomic<bool>* shouldIterate, size_t maxSize) {
544544
for (; it != end; ++it) {
545545
++count;
546546
if (count > maxSize) {
547-
EXPECT_FALSE("Infinite loop in iterator.");
547+
EXPECT_TRUE(false && "Infinite loop in iterator.");
548548
return;
549549
}
550550
}

0 commit comments

Comments
 (0)