Skip to content

Enable warnings for default builds. - #4760

Open
darobs wants to merge 4 commits into
open-telemetry:mainfrom
darobs:darobs/add-baseline-warnings
Open

darobs wants to merge 4 commits into
open-telemetry:mainfrom
darobs:darobs/add-baseline-warnings

Conversation

@darobs

@darobs darobs commented Nov 2, 2026

Copy link
Copy Markdown

Changes

Enable compiler diagnostics for ordinary builds. Currently, OpenTelemetry explicitly configures warning settings only when OTELCPP_MAINTAINER_MODE is enabled.

This change establishes a baseline warning policy for normal builds:  /W3 for MSVC and -Wall for GCC, Clang, and AppleClang. It does not introduce warnings-as-errors or additional warning suppressions.

Passing maintainer-mode CI does not ensure that SDK binaries produced by downstream applications or package managers were compiled with meaningful warnings enabled. This affects binary build-policy verification: Microsoft’s open-source BinSkim checks MSVC warning levels, while annocheck in the Red Hat/Fedora ecosystem checks whether warnings such as  -Wall were enabled.

For MSVC, this restores explicit baseline diagnostics following the removal of the CMP0092 compatibility workaround, without reinstating a deprecated CMake policy.

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

@darobs
darobs requested a review from a team as a code owner November 2, 2026 18:23
@codecov

codecov Bot commented Nov 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.62%. Comparing base (0a5bb0b) to head (197f855).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #4760   +/-   ##
=======================================
  Coverage   86.62%   86.62%           
=======================================
  Files         530      530           
  Lines       21169    21169           
=======================================
  Hits        18335    18335           
  Misses       2834     2834           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant