Skip to content

Commit c6a8633

Browse files
committed
Fix valgrind issues with gtest
1 parent 99fb5c0 commit c6a8633

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

api/test/trace/propagation/detail/string_test.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77

88
#include "opentelemetry/nostd/string_view.h"
99

10+
// There is an issue with using googletest and valgrind where if a struct used as a parameter has
11+
// any padding, it causes valgrind to report it as "use of uninitialized value".
12+
// pragma pack instructs compilers not to insert additional padding
13+
#pragma pack(1)
1014
struct SplitStringTestData
1115
{
1216
opentelemetry::nostd::string_view input;

0 commit comments

Comments
 (0)