From: Guillaume Chatelet Date: Thu, 20 Oct 2022 08:52:56 +0000 (+0000) Subject: [libc][NFC] add missing static qualifiers in tests X-Git-Tag: upstream/17.0.6~30048 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3f81126a338796427a364719f19076d1a37e4b25;p=platform%2Fupstream%2Fllvm.git [libc][NFC] add missing static qualifiers in tests --- diff --git a/libc/test/src/string/memory_utils/elements_test.cpp b/libc/test/src/string/memory_utils/elements_test.cpp index 2187001..d112844 100644 --- a/libc/test/src/string/memory_utils/elements_test.cpp +++ b/libc/test/src/string/memory_utils/elements_test.cpp @@ -42,7 +42,7 @@ using FixedSizeTypes = testing::TypeList< builtin::_8 // >; -char GetRandomChar() { +static char GetRandomChar() { static constexpr const uint64_t a = 1103515245; static constexpr const uint64_t c = 12345; static constexpr const uint64_t m = 1ULL << 31; @@ -51,7 +51,7 @@ char GetRandomChar() { return seed; } -void Randomize(cpp::span buffer) { +static void Randomize(cpp::span buffer) { for (auto ¤t : buffer) current = GetRandomChar(); } diff --git a/libc/test/src/string/memory_utils/memory_access_test.cpp b/libc/test/src/string/memory_utils/memory_access_test.cpp index 252cb6e..a9eb1f8 100644 --- a/libc/test/src/string/memory_utils/memory_access_test.cpp +++ b/libc/test/src/string/memory_utils/memory_access_test.cpp @@ -69,7 +69,7 @@ struct MemoryAccessObserver { Buffer Buffer2; }; -MemoryAccessObserver Observer; +static MemoryAccessObserver Observer; template struct TestingElement { static constexpr size_t SIZE = Size;