Skip to content

Commit

Permalink
Merge pull request #1606 from Expensify/cole_gcc13
Browse files Browse the repository at this point in the history
Make bedrock GCC13 compatible
  • Loading branch information
tylerkaraszewski authored Nov 8, 2023
2 parents a1ad6fe + c691d15 commit 61cfaec
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions sqlitecluster/SQLiteNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ SQLiteNode::SQLiteNode(SQLiteServer& server, shared_ptr<SQLitePool> dbPool, cons
{
SASSERT(_originalPriority >= 0);
onPrepareHandlerEnabled = false;

// We create a copy of the database handle here so that the sync node can operate on its handle and the plugin gets
// its own handle to operate on. This avoids conflicts where the sync thread and the plugin are trying to both run
// queries at the same time. This also avoids the need to create any share locking between the two.
Expand Down Expand Up @@ -567,7 +567,7 @@ bool SQLiteNode::update() {
size_t numFullPeers = 0;
size_t numLoggedInFullPeers = 0;
SQLitePeer* freshestPeer = nullptr;
for (const auto peer : _peerList) {
for (const auto& peer : _peerList) {
// Count how many full peers (non-permafollowers) we have, and how many are logged in.
// Note that the `permaFollower` property is const and this value will always be the same for a given peer.
if (!peer->permaFollower) {
Expand Down
2 changes: 1 addition & 1 deletion test/clustertest/tests/ClusterUpgradeTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ struct ClusterUpgradeTest : tpunit::TestFixture {
ASSERT_FALSE(system(("cd " + brReleaseDir + " && cd Bedrock && git checkout " + bedrockTagName + " > /dev/null").c_str()));

// Build the release.
ASSERT_FALSE(system(("cd " + brReleaseDir + " && cd Bedrock && make -j8 > /dev/null").c_str()));
ASSERT_FALSE(system(("cd " + brReleaseDir + " && cd Bedrock && CXX=g++-9 CC=gcc-9 make -j8 > /dev/null").c_str()));

// Save the final product.
mkdir(prodBedrockDirName.c_str(), 0755);
Expand Down
8 changes: 4 additions & 4 deletions test/lib/tpunit++.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ using namespace std;
* ASSERT|EXPECT_FLOAT_NEAR(lhs, rhs, abs_error); generates a failure if
* the given floating-point values exceed the absolute error.
*/
#define ASSERT_FLOAT_EQUAL(lhs, rhs) if(tpunit_detail_fp_equal(lhs, rhs, 4)) { PASS(); } else { "incorrectly asserted " + SToStr(lhs) + " = " + SToStr(rhs); ABORT(); }
#define EXPECT_FLOAT_EQUAL(lhs, rhs) if(tpunit_detail_fp_equal(lhs, rhs, 4)) { PASS(); } else { "incorrectly expected " + SToStr(lhs) + " = " + SToStr(rhs); FAIL(); }
#define ASSERT_FLOAT_NEAR(lhs, rhs, abs_error) if((((lhs) > (rhs)) ? (lhs) - (rhs) : (rhs) - (lhs)) <= (abs_error)) { PASS(); } else { "incorrectly asserted " + SToStr(lhs) + " near " + SToStr(rhs); ABORT(); }
#define EXPECT_FLOAT_NEAR(lhs, rhs, abs_error) if((((lhs) > (rhs)) ? (lhs) - (rhs) : (rhs) - (lhs)) <= (abs_error)) { PASS(); } else { "incorrectly expected " + SToStr(lhs) + " near " + SToStr(rhs); FAIL(); }
#define ASSERT_FLOAT_EQUAL(lhs, rhs) if(tpunit_detail_fp_equal(lhs, rhs, 4)) { PASS(); } else { PrintEquality(lhs, rhs, false); ABORT(); }
#define EXPECT_FLOAT_EQUAL(lhs, rhs) if(tpunit_detail_fp_equal(lhs, rhs, 4)) { PASS(); } else { PrintEquality(lhs, rhs, false); FAIL(); }
#define ASSERT_FLOAT_NEAR(lhs, rhs, abs_error) if((((lhs) > (rhs)) ? (lhs) - (rhs) : (rhs) - (lhs)) <= (abs_error)) { PASS(); } else { TESTINFO("incorrectly asserted " + SToStr(lhs) + " near " + SToStr(rhs)); ABORT(); }
#define EXPECT_FLOAT_NEAR(lhs, rhs, abs_error) if((((lhs) > (rhs)) ? (lhs) - (rhs) : (rhs) - (lhs)) <= (abs_error)) { PASS(); } else { TESTINFO("incorrectly expected " + SToStr(lhs) + " near " + SToStr(rhs)); FAIL(); }

/**
* The set of macros for checking whether a statement will throw or not
Expand Down

0 comments on commit 61cfaec

Please sign in to comment.