microsoft / microsoft/wil

[prefast:Warning]: C26495 (in 'wil::TraceLoggingProvider::{ctor}')

Open
#288 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

code-analysis
Dominant language
C++
Stars
3k
Forks
300
Avg merge
19h 12m
Merged PRs (30d)
1

Description

PreFast says the 'wil::TraceLoggingProvider::{ctor}' in include/wil/TraceLogging.h has an issue: "Variable 'wil::TraceLoggingProvider::m_errorReportingType' is uninitialized. Always initialize a member variable (type.6).".
That seems to mean the following constructor neglected to initialize m_errorReportingType:
TraceLoggingProvider(_In_ TraceLoggingProvider const&) = delete;

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open include/wil/TraceLogging.h and inspect the TraceLoggingProvider constructor and the m_errorReportingType member named in the warning. Run PreFast on the affected code and confirm that the C26495 uninitialized-member warning is resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
devtools
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.