Skip to content

Commit 83ba52f

Browse files
ironageKirill Burtsev
andauthored
RCORE-2188 fix gcc warnings and add a ubuntu 2404 GCC runner (#7856)
* fix gcc warnings and add a ubuntu 2404 GCC runner * fix a compiler error in newer gcc 'error: possibly dangling reference to a temporary' * fix build error on alpin due to missing header --------- Co-authored-by: Kirill Burtsev <[email protected]>
1 parent 3551a42 commit 83ba52f

File tree

4 files changed

+16
-42
lines changed

4 files changed

+16
-42
lines changed

evergreen/config.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1440,6 +1440,15 @@ buildvariants:
14401440
tasks:
14411441
- name: compile_local_tests
14421442

1443+
- name: ubuntu-2404-GCC
1444+
display_name: "Ubuntu 24.04 arm64 (native GCC)"
1445+
run_on: ubuntu2404-arm64-large
1446+
expansions:
1447+
fetch_missing_dependencies: On
1448+
disable_tests_against_baas: On
1449+
tasks:
1450+
- name: compile_local_tests
1451+
14431452
- name: ubuntu-encryption-tsan
14441453
display_name: "Ubuntu (Encryption Enabled w/TSAN)"
14451454
run_on: ubuntu2204-arm64-small
@@ -1488,7 +1497,7 @@ buildvariants:
14881497
- name: generate-sync-corpus
14891498

14901499
- name: ubuntu2004-arm64
1491-
display_name: "Ubuntu 20.04 ARM64 (Clang 11 release benchmarks)"
1500+
display_name: "Ubuntu 20.04 ARM64 (GCC 9 release benchmarks)"
14921501
run_on: ubuntu2004-arm64-large
14931502
expansions:
14941503
cmake_url: "https://s3.amazonaws.com/static.realm.io/evergreen-assets/cmake-3.26.3-linux-aarch64.tar.gz"

src/external/s2/s2polygonbuilder.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,8 @@ S2Loop* S2PolygonBuilder::AssembleLoop(S2Point const& v0, S2Point const& v1,
180180
path.push_back(v1);
181181
index[v1] = 1;
182182
while (path.size() >= 2) {
183-
// Note that "v0" and "v1" become invalid if "path" is modified.
184-
S2Point const& v0 = path.end()[-2];
185-
S2Point const& v1 = path.end()[-1];
183+
S2Point const v0 = path.end()[-2];
184+
S2Point const v1 = path.end()[-1];
186185
S2Point v2;
187186
bool v2_found = false;
188187
EdgeSet::const_iterator candidates = edges_->find(v1);

src/realm/sync/noinst/client_reset_recovery.cpp

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -129,14 +129,11 @@ struct ListPath {
129129
ColumnKey,
130130
} type;
131131

132-
bool operator==(const Element& other) const noexcept;
133-
bool operator!=(const Element& other) const noexcept;
134132
bool operator<(const Element& other) const noexcept;
135133
};
136134

137135
void append(const Element& item);
138136
bool operator<(const ListPath& other) const noexcept;
139-
bool operator==(const ListPath& other) const noexcept;
140137
std::string path_to_string(Transaction& remote, const InterningBuffer& buffer);
141138

142139
using const_iterator = typename std::vector<Element>::const_iterator;
@@ -419,26 +416,6 @@ ListPath::Element::Element(ColKey key)
419416
{
420417
}
421418

422-
bool ListPath::Element::operator==(const Element& other) const noexcept
423-
{
424-
if (type == other.type) {
425-
switch (type) {
426-
case Type::InternKey:
427-
return intern_key == other.intern_key;
428-
case Type::ListIndex:
429-
return index == other.index;
430-
case Type::ColumnKey:
431-
return col_key == other.col_key;
432-
}
433-
}
434-
return false;
435-
}
436-
437-
bool ListPath::Element::operator!=(const Element& other) const noexcept
438-
{
439-
return !(operator==(other));
440-
}
441-
442419
bool ListPath::Element::operator<(const Element& other) const noexcept
443420
{
444421
if (type < other.type) {
@@ -476,19 +453,6 @@ bool ListPath::operator<(const ListPath& other) const noexcept
476453
return std::lexicographical_compare(m_path.begin(), m_path.end(), other.m_path.begin(), other.m_path.end());
477454
}
478455

479-
bool ListPath::operator==(const ListPath& other) const noexcept
480-
{
481-
if (m_table_key == other.m_table_key && m_obj_key == other.m_obj_key && m_path.size() == other.m_path.size()) {
482-
for (size_t i = 0; i < m_path.size(); ++i) {
483-
if (m_path[i] != other.m_path[i]) {
484-
return false;
485-
}
486-
}
487-
return true;
488-
}
489-
return false;
490-
}
491-
492456
std::string ListPath::path_to_string(Transaction& remote, const InterningBuffer& buffer)
493457
{
494458
TableRef remote_table = remote.get_table(m_table_key);

src/realm/util/cli_args.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#include "realm/util/cli_args.hpp"
2-
#include <string>
3-
#include <errno.h>
2+
43
#include <algorithm>
4+
#include <cerrno>
5+
#include <cstdint>
6+
#include <string>
57

68
namespace realm::util {
79

0 commit comments

Comments
 (0)