-
Notifications
You must be signed in to change notification settings - Fork 501
[BUILD] Remove duplicated deprecated warnings in logs headers #3592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -84,8 +84,27 @@ class OPENTELEMETRY_EXPORT Provider | |||||||||||||||
OPENTELEMETRY_API_SINGLETON static nostd::shared_ptr<EventLoggerProvider> & | ||||||||||||||||
GetEventProvider() noexcept | ||||||||||||||||
{ | ||||||||||||||||
# if defined(_MSC_VER) | ||||||||||||||||
marcalff marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||
# pragma warning(push) | ||||||||||||||||
# pragma warning(disable : 4996) | ||||||||||||||||
# elif defined(__GNUC__) && !defined(__clang__) && !defined(__apple_build_version__) | ||||||||||||||||
# pragma GCC diagnostic push | ||||||||||||||||
# pragma GCC diagnostic ignored "-Wdeprecated-declarations" | ||||||||||||||||
# elif defined(__clang__) || defined(__apple_build_version__) | ||||||||||||||||
# pragma clang diagnostic push | ||||||||||||||||
# pragma clang diagnostic ignored "-Wdeprecated-declarations" | ||||||||||||||||
# endif | ||||||||||||||||
|
||||||||||||||||
static nostd::shared_ptr<EventLoggerProvider> provider(new NoopEventLoggerProvider); | ||||||||||||||||
return provider; | ||||||||||||||||
|
||||||||||||||||
# if defined(_MSC_VER) | ||||||||||||||||
# pragma warning(pop) | ||||||||||||||||
# elif defined(__GNUC__) && !defined(__clang__) && !defined(__apple_build_version__) | ||||||||||||||||
# pragma GCC diagnostic pop | ||||||||||||||||
# elif defined(__clang__) || defined(__apple_build_version__) | ||||||||||||||||
# pragma clang diagnostic pop | ||||||||||||||||
# endif | ||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The pragma directive blocks are duplicated across multiple files. Consider creating a macro or header file to define OPENTELEMETRY_SUPPRESS_DEPRECATED_START and OPENTELEMETRY_SUPPRESS_DEPRECATED_END to reduce code duplication and improve maintainability.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||||||||||||
} | ||||||||||||||||
#endif | ||||||||||||||||
|
||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pragma directive blocks are duplicated across multiple files. Consider creating a macro or header file to define OPENTELEMETRY_SUPPRESS_DEPRECATED_START and OPENTELEMETRY_SUPPRESS_DEPRECATED_END to reduce code duplication and improve maintainability.
Copilot uses AI. Check for mistakes.