Skip to content

Commit bf67be3

Browse files
Merge pull request #1706 from vsg-dev/cppcheck_fixes
Mostly cppcheck warning fixes with a couple of bugs fixed.
2 parents 28cbb3b + e4674d4 commit bf67be3

162 files changed

Lines changed: 244 additions & 285 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ project(vsg
55
DESCRIPTION "VulkanSceneGraph library"
66
LANGUAGES CXX
77
)
8-
set(VSG_SOVERSION 16)
8+
set(VSG_SOVERSION 17)
99
SET(VSG_RELEASE_CANDIDATE 0)
1010
set(Vulkan_MIN_VERSION 1.1.70.0)
1111

cmake/cppcheck-suppression-list.txt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ arrayIndexOutOfBounds:*/include/vsg/vk/State.h
152152
// suppress warnings about intentional code usage or where cppcheck just hasn't got a clue about how templates are used...
153153
knownConditionTrueFalse:*/src/vsg/utils/Builder.cpp
154154
knownConditionTrueFalse:*/include/vsg/utils/CommandLine.h
155+
knownConditionTrueFalse:*/include/vsg/core/Inherit.h
155156

156157
// suppress warning about initializtion.
157158
useInitializationList:*/include/vsg/core/ScratchMemory.h
@@ -223,6 +224,11 @@ cstyleCast:*/src/vsg/io/mem_stream.cpp
223224

224225
// suppress unhelpful warnings of override that make inform programmers what is being done
225226
uselessOverride:*/include/vsg/utils/TracyInstrumentation.h
227+
uselessOverride:*/include/vsg/ui/WindowEvent.h
228+
uselessOverride:*/include/vsg/utils/ShaderSet.h
229+
uselessOverride:*/include/vsg/nodes/Transform.h
230+
uselessOverride:*/include/vsg/raytracing/DescriptorAccelerationStructure.h
231+
uselessOverride:*/include/vsg/raytracing/RayTracingShaderGroup.h
226232

227233
// suppress inappropriate warning
228234
constParameterReference:*/include/vsg/vk/Device.h
@@ -242,3 +248,22 @@ constVariablePointer:*/src/vsg/app/SecondaryCommandGraph.cpp
242248
// suppress inappropriate warning
243249
passedByValue:*/src/vsg/vk/Device.cpp
244250
passedByValue:*/src/vsg/vk/Instance.cpp
251+
252+
// suppress inappropriate warnings
253+
functionStatic:*/include/vsg/io/Output.h
254+
functionStatic:*/include/vsg/io/Input.h
255+
functionStatic:*/src/vsg/app/CompileManager.h
256+
functionStatic:*/include/vsg/app/RecordTraversal.h
257+
functionStatic:*/include/vsg/io/VSG.h
258+
functionStatic:*/include/vsg/io/json.h
259+
functionStatic:*/include/vsg/io/txt.h
260+
functionStatic:*/include/vsg/io/tile.h
261+
functionStatic:*/include/vsg/state/QueryPool.h
262+
functionStatic:*/include/vsg/state/ArrayState.h
263+
functionStatic:*/include/vsg/text/StandardLayout.h
264+
functionStatic:*/include/vsg/utils/Builder.h
265+
functionStatic:*/include/vsg/utils/ShaderCompiler.h
266+
267+
268+
// suppress inappropriate warnings
269+
suspiciousFloatingPointCast:*/src/vsg/maths/maths_transform.cpp

include/vsg/animation/AnimationGroup.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ namespace vsg
5050
void write(Output& output) const override;
5151

5252
protected:
53-
virtual ~AnimationGroup();
53+
~AnimationGroup() override;
5454
};
5555
VSG_type_name(vsg::AnimationGroup);
5656

include/vsg/animation/Joint.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ namespace vsg
5454
void write(Output& output) const override;
5555

5656
protected:
57-
virtual ~Joint();
57+
~Joint() override;
5858
};
5959
VSG_type_name(vsg::Joint);
6060

include/vsg/app/CommandGraph.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ namespace vsg
5454
ref_ptr<Instrumentation> instrumentation;
5555

5656
protected:
57-
virtual ~CommandGraph();
57+
~CommandGraph() override;
5858

5959
CommandBuffers _commandBuffers; // assign one per index? Or just use round robin, each has a CommandPool
6060
};

include/vsg/app/CompileManager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ namespace vsg
9191
std::atomic_uint failedCompileCount{0};
9292

9393
protected:
94-
~CompileManager();
94+
~CompileManager() override;
9595

9696
using CompileTraversals = ThreadSafeQueue<ref_ptr<CompileTraversal>>;
9797
size_t numCompileTraversals = 0;

include/vsg/app/CompileTraversal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ namespace vsg
103103
void apply(View& view) override;
104104

105105
protected:
106-
~CompileTraversal();
106+
~CompileTraversal() override;
107107

108108
void add(ref_ptr<Context> context, Framebuffer& framebuffer, ref_ptr<TransferTask> transferTask, ref_ptr<View> view, const ResourceRequirements& resourceRequirements);
109109
void addViewDependentState(ViewDependentState& viewDependentState, ref_ptr<Device> device, ref_ptr<TransferTask> transferTask, const ResourceRequirements& resourceRequirements);

include/vsg/app/RecordTraversal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ namespace vsg
185185
ref_ptr<ViewDependentState> viewDependentState;
186186

187187
protected:
188-
virtual ~RecordTraversal();
188+
~RecordTraversal() override;
189189
};
190190

191191
} // namespace vsg

include/vsg/app/SecondaryCommandGraph.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ namespace vsg
4343
void record(ref_ptr<RecordedCommandBuffers> recordedCommandBuffers, ref_ptr<FrameStamp> frameStamp = {}, ref_ptr<DatabasePager> databasePager = {}) override;
4444

4545
protected:
46-
virtual ~SecondaryCommandGraph();
46+
~SecondaryCommandGraph() override;
4747

4848
friend ExecuteCommands;
4949

include/vsg/app/UpdateOperations.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ namespace vsg
5555
virtual void run();
5656

5757
protected:
58-
virtual ~UpdateOperations();
58+
~UpdateOperations() override;
5959

6060
mutable std::mutex _updateOperationMutex;
6161
std::list<ref_ptr<Operation>> _updateOperationsOneTime;

0 commit comments

Comments
 (0)