From acb6d97f7c1f569bcadbd76fbe94e3dcccc00acd Mon Sep 17 00:00:00 2001 From: Larry Osterman Date: Thu, 4 Apr 2024 17:20:38 -0700 Subject: [PATCH] Disable otel warnings in shared_functions.hpp (#5494) --- .../src/scenarios/inc/shared_functions.hpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sdk/eventhubs/azure-messaging-eventhubs/test/eventhubs-stress-test/src/scenarios/inc/shared_functions.hpp b/sdk/eventhubs/azure-messaging-eventhubs/test/eventhubs-stress-test/src/scenarios/inc/shared_functions.hpp index 9c142edce..de6bca0f3 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/test/eventhubs-stress-test/src/scenarios/inc/shared_functions.hpp +++ b/sdk/eventhubs/azure-messaging-eventhubs/test/eventhubs-stress-test/src/scenarios/inc/shared_functions.hpp @@ -14,12 +14,25 @@ #include #include +#if defined(_MSC_VER) +// The OpenTelemetry headers generate a couple of warnings on MSVC in the OTel 1.2 package, suppress +// the warnings across the includes. +#pragma warning(push) +#pragma warning(disable : 4100) +#pragma warning(disable : 4244) +#pragma warning(disable : 6323) // Disable "Use of arithmetic operator on Boolean type" warning. +#endif + #include #include #include #include #include +#if defined(_MSC_VER) +#pragma warning(pop) +#endif + opentelemetry::nostd::shared_ptr GetLogger(); opentelemetry::nostd::shared_ptr GetTracer();