Skip to content

Commit

Permalink
set TreatWarningsAsErrors to true (#1897)
Browse files Browse the repository at this point in the history
* set TreatWarningsAsErrors to true to ensure that no new warnings are being added

* solve the only warning we have
  • Loading branch information
adamsitnik authored Aug 24, 2022
1 parent 387ca0e commit 52d7707
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions build/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<UseSharedCompilation>false</UseSharedCompilation>
<SuppressNETCoreSdkPreviewMessage>True</SuppressNETCoreSdkPreviewMessage>
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)CodingStyle.ruleset</CodeAnalysisRuleSet>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 2 additions & 0 deletions src/BenchmarkDotNet.Diagnostics.Windows/EtwProfilerConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public class EtwProfilerConfig
public float CpuSampleIntervalInMilliseconds { get; }

public KernelTraceEventParser.Keywords KernelKeywords { get; }

public KernelTraceEventParser.Keywords KernelStackKeywords { get; }

public IReadOnlyDictionary<HardwareCounter, Func<ProfileSourceInfo, int>> IntervalSelectors { get; }
Expand All @@ -31,6 +32,7 @@ public class EtwProfilerConfig
/// <param name="cpuSampleIntervalInMilliseconds">The rate at which CPU samples are collected. By default this is 1 (once a millisecond per CPU). There is a lower bound on this (typically 0.125 ms)</param>
/// <param name="intervalSelectors">interval per hardware counter, if not provided then default values will be used.</param>
/// <param name="kernelKeywords">kernel session keywords, ImageLoad (for native stack frames) and Profile (for CPU Stacks) are the defaults</param>
/// <param name="kernelStackKeywords">This is passed to TraceEventSession.EnableKernelProvider to enable particular sets of events. See https://docs.microsoft.com/windows/win32/api/evntrace/ns-evntrace-event_trace_properties#members for more information on them.</param>
/// <param name="providers">providers that should be enabled, if not provided then default values will be used</param>
/// <param name="createHeapSession">value indicating whether to create heap session. False by default, used internally by NativeMemoryProfiler.</param>
public EtwProfilerConfig(
Expand Down

0 comments on commit 52d7707

Please sign in to comment.