Skip to content

Commit

Permalink
REGRESSION(270409@main): Broke linux clang-16 builds
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=264484

Reviewed by Chris Dumez.

* Source/WebCore/platform/audio/SincResampler.cpp:
(WebCore::SincResampler::processBuffer): Use gcc/clang agnostic pragma macros instead of the ones
specific to GCC.

Canonical link: https://commits.webkit.org/270447@main
  • Loading branch information
philn committed Nov 9, 2023
1 parent 595985c commit 3e19210
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions Source/WebCore/platform/audio/SincResampler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,16 +208,9 @@ void SincResampler::processBuffer(std::span<const float> source, std::span<float
// Clamp to number of frames available and zero-pad.
size_t framesToCopy = std::min(source.size(), framesToProcess);

#if defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wrestrict"
#endif

IGNORE_WARNINGS_BEGIN("restrict")
memcpySpan(buffer.subspan(0, framesToCopy), source.subspan(0, framesToCopy));

#if defined(__GNUC__)
#pragma GCC diagnostic pop
#endif
IGNORE_WARNINGS_END

// Zero-pad if necessary.
if (framesToCopy < framesToProcess)
Expand Down

0 comments on commit 3e19210

Please sign in to comment.