Skip to content

Commit d39e7b0

Browse files
committed
Merge branch 'infra/coverity-fixes-ray' into infra/coverity
2 parents 8451f37 + 38c4d9d commit d39e7b0

File tree

5 files changed

+31
-1
lines changed

5 files changed

+31
-1
lines changed

IntelPresentMon/CommonUtilities/cli/CliFramework.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ namespace pmon::util::cli
8787
{
8888
pOption_ = pParent->app_.add_option(std::move(names), data_, std::move(description));
8989
}
90+
Option(const Option&) = delete;
91+
Option & operator=(const Option&) = delete;
92+
Option(Option&&) = delete;
93+
Option & operator=(Option&&) = delete;
94+
~Option() = default;
9095
const T& operator*() const
9196
{
9297
return data_;

IntelPresentMon/Core/source/pmon/RawFrameDataWriter.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ namespace p2c::pmon
100100
if (available) {
101101
const auto typeId = metric.GetDataTypeInfo().GetFrameType();
102102
// DISPLAYED_TIME and DISPLAY_LATENCY should just show zeros when NaN is encountered
103-
const bool zeroForNA = metricId == PM_METRIC_DISPLAYED_TIME || PM_METRIC_DISPLAY_LATENCY;
103+
const bool zeroForNA = (metricId == PM_METRIC_DISPLAYED_TIME)
104+
|| (metricId == PM_METRIC_DISPLAY_LATENCY);
104105
// special case for TIME, it needs to be relative to TIME of first frame and scaled ms => s
105106
if (metricId == PM_METRIC_TIME) {
106107
pAnnotation = std::make_unique<TypedAnnotation_<TimeAnnotationType_>>();

IntelPresentMon/Core/source/pmon/metric/MetricFetcher.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,14 @@ namespace p2c::pmon::met
99
class MetricFetcher
1010
{
1111
public:
12+
MetricFetcher() = default;
1213
virtual ~MetricFetcher();
1314
virtual std::wstring ReadStringValue();
1415
virtual std::optional<float> ReadValue() = 0;
16+
17+
MetricFetcher(const MetricFetcher&) = delete;
18+
MetricFetcher & operator=(const MetricFetcher&) = delete;
19+
MetricFetcher(MetricFetcher&&) = delete;
20+
MetricFetcher & operator=(MetricFetcher&&) = delete;
1521
};
1622
}

IntelPresentMon/Interprocess/source/IntrospectionCloneAllocators.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ namespace pmon::ipc::intro
1616
ProbeAllocator(const ProbeAllocator<void>& other)
1717
: pTotalSize(other.pTotalSize)
1818
{}
19+
ProbeAllocator& operator=(const ProbeAllocator&) = delete;
1920
T* allocate(size_t count)
2021
{
2122
*pTotalSize += sizeof(T) * count + util::GetPadding<T>(*pTotalSize);
@@ -43,6 +44,7 @@ namespace pmon::ipc::intro
4344
pTotalSize(other.pTotalSize),
4445
pBytes{ other.pBytes }
4546
{}
47+
BlockAllocator& operator=(const BlockAllocator&) = delete;
4648
T* allocate(size_t count)
4749
{
4850
*pTotalSize += util::GetPadding<T>(*pTotalSize);

IntelPresentMon/PresentMonService/Service.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class Service
2020
std::optional<int> GetErrorCode() const;
2121
virtual HANDLE GetServiceStopHandle() = 0;
2222
virtual HANDLE GetResetPowerTelemetryHandle() = 0;
23+
virtual ~Service() = default;
2324
private:
2425
std::optional<int> errCode_;
2526
};
@@ -31,6 +32,12 @@ class ConsoleDebugMockService : public Service
3132
void Run();
3233
HANDLE GetServiceStopHandle() override;
3334
HANDLE GetResetPowerTelemetryHandle() override;
35+
36+
ConsoleDebugMockService(const ConsoleDebugMockService&) = delete;
37+
ConsoleDebugMockService & operator=(const ConsoleDebugMockService&) = delete;
38+
ConsoleDebugMockService(ConsoleDebugMockService&&) = delete;
39+
ConsoleDebugMockService & operator=(ConsoleDebugMockService&&) = delete;
40+
3441
private:
3542
ConsoleDebugMockService();
3643
~ConsoleDebugMockService();
@@ -52,6 +59,15 @@ class ConcreteService : public Service
5259
}
5360
void ReportServiceStatus(DWORD currentState, DWORD win32ExitCode,
5461
DWORD waitHint);
62+
63+
64+
ConcreteService(const ConcreteService&) = delete;
65+
ConcreteService & operator=(const ConcreteService&) = delete;
66+
ConcreteService(ConcreteService&&) = delete;
67+
ConcreteService & operator=(ConcreteService&&) = delete;
68+
~ConcreteService() = default;
69+
70+
5571
private:
5672
void ServiceInit();
5773

0 commit comments

Comments
 (0)