Skip to content

Commit

Permalink
Fixed issues arising from CI updating from Ubuntu 22.04/gcc11 to 24.0…
Browse files Browse the repository at this point in the history
…4/gcc13 (#244)

* crill:   Work around a gcc bug

* Bugfix:   Added a possible nullptr check

* Bug:   Another attempt at a gcc work around

* Only work around in gcc 13 or later

* Fixed compile error

* Different way to zero init

* Silence s lcov warning

* Check it's not a preprocessor error

* Just ignore the warning

* gcov:   Ignore negative errors

* Fixed arg passing

* gcov:   Ignore unused errors
  • Loading branch information
drowaudio authored Jan 13, 2025
1 parent d42b13b commit 33476e6
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/generate_coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
cmake -G Ninja -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build ./build --target coverage --config RelWithDebInfo --parallel
build/coverage_artefacts/RelWithDebInfo/coverage
lcov --capture --directory "build" --output-file coverage.info \
lcov --capture --directory "build" --output-file coverage.info --rc geninfo_unexecuted_blocks=1 --ignore-errors negative --ignore-errors unused \
--exclude "tests/coverage/*" \
--exclude "examples/common/*" \
--exclude "tests/coverage/coverage.h" \
Expand Down
10 changes: 10 additions & 0 deletions modules/3rd_party/crill/seqlock_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
#include <cstring>
#include <atomic>

#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wuninitialized"
#endif

namespace crill {

// A portable C++ implementation of a seqlock inspired by Hans Boehm's paper
Expand Down Expand Up @@ -75,6 +80,7 @@ class seqlock_object
void store(T t) noexcept
{
std::size_t buffer[buffer_size];

if constexpr (sizeof(T) % sizeof(std::size_t) != 0)
buffer[buffer_size - 1] = 0;

Expand All @@ -101,4 +107,8 @@ class seqlock_object

} // namespace crill

#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif

#endif //CRILL_SEQLOCK_OBJECT_H
Original file line number Diff line number Diff line change
Expand Up @@ -1242,7 +1242,12 @@ struct PluginUnloadInhibitor : private juce::Timer
{
for (int i = jobs.size(); --i >= 0;)
{
if (jobs[i]->progress >= 1.0f)
auto job = jobs[i];

if (job == nullptr)
continue;

if (job->progress.load() >= 1.0f)
jobs.remove (i);
else
return;
Expand Down

0 comments on commit 33476e6

Please sign in to comment.