[libc][NFC] add missing static qualifiers in tests
authorGuillaume Chatelet <gchatelet@google.com>
Thu, 20 Oct 2022 08:52:56 +0000 (08:52 +0000)
committerGuillaume Chatelet <gchatelet@google.com>
Thu, 20 Oct 2022 08:52:56 +0000 (08:52 +0000)
libc/test/src/string/memory_utils/elements_test.cpp
libc/test/src/string/memory_utils/memory_access_test.cpp

index 2187001..d112844 100644 (file)
@@ -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<char> buffer) {
+static void Randomize(cpp::span<char> buffer) {
   for (auto &current : buffer)
     current = GetRandomChar();
 }
index 252cb6e..a9eb1f8 100644 (file)
@@ -69,7 +69,7 @@ struct MemoryAccessObserver {
   Buffer Buffer2;
 };
 
-MemoryAccessObserver Observer;
+static MemoryAccessObserver Observer;
 
 template <size_t Size> struct TestingElement {
   static constexpr size_t SIZE = Size;