From 5f6319ad47776d2a515feadbbedc871dc0857946 Mon Sep 17 00:00:00 2001 From: Bogumil Sapinski Date: Thu, 22 Jun 2023 12:45:09 +0200 Subject: [PATCH 1/4] fix unused-parameter warning in samples --- samples/core/enumopencl/main.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/samples/core/enumopencl/main.cpp b/samples/core/enumopencl/main.cpp index ee180538..5d050107 100644 --- a/samples/core/enumopencl/main.cpp +++ b/samples/core/enumopencl/main.cpp @@ -67,6 +67,9 @@ static cl_int PrintDeviceInfoSummary(const std::vector devices) int main(int argc, char** argv) { + (void) argc; + (void**) argv; + std::vector platforms; cl::Platform::get(&platforms); std::cout << "Enumerated " << platforms.size() << " platforms.\n\n"; From 28f1bda2eb1848f53eb0691fb79c30de8f3c45f8 Mon Sep 17 00:00:00 2001 From: Bogumil Sapinski Date: Thu, 22 Jun 2023 12:48:46 +0200 Subject: [PATCH 2/4] Revert "fix unused-parameter warning in samples" This reverts commit 5f6319ad47776d2a515feadbbedc871dc0857946. --- samples/core/enumopencl/main.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/samples/core/enumopencl/main.cpp b/samples/core/enumopencl/main.cpp index 5d050107..ee180538 100644 --- a/samples/core/enumopencl/main.cpp +++ b/samples/core/enumopencl/main.cpp @@ -67,9 +67,6 @@ static cl_int PrintDeviceInfoSummary(const std::vector devices) int main(int argc, char** argv) { - (void) argc; - (void**) argv; - std::vector platforms; cl::Platform::get(&platforms); std::cout << "Enumerated " << platforms.size() << " platforms.\n\n"; From 90ea40f3468df958da7684fb183e9231507bd5e5 Mon Sep 17 00:00:00 2001 From: Bogumil Sapinski Date: Mon, 26 Jun 2023 14:05:51 +0200 Subject: [PATCH 3/4] fixed warning unhandled enumeration value in switch --- samples/extensions/khr/conway/main.cpp | 2 ++ samples/extensions/khr/nbody/main.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/samples/extensions/khr/conway/main.cpp b/samples/extensions/khr/conway/main.cpp index 4034df6d..d595a367 100644 --- a/samples/extensions/khr/conway/main.cpp +++ b/samples/extensions/khr/conway/main.cpp @@ -363,6 +363,8 @@ void Conway::event(const sf::Event& event) animating = !animating; } break; + default: + break; } } diff --git a/samples/extensions/khr/nbody/main.cpp b/samples/extensions/khr/nbody/main.cpp index 7805ae09..1482584e 100644 --- a/samples/extensions/khr/nbody/main.cpp +++ b/samples/extensions/khr/nbody/main.cpp @@ -421,6 +421,8 @@ void NBody::event(const sf::Event& event) dist = abs(dist); needMatrixReset = true; // view matrix need to be recalculated break; + default: + break; } } From 2eb91de7b961075f2ebe01f15be19776b3664b6c Mon Sep 17 00:00:00 2001 From: Bogumil Sapinski Date: Thu, 6 Jul 2023 10:29:10 +0200 Subject: [PATCH 4/4] formatting --- samples/extensions/khr/conway/main.cpp | 3 +-- samples/extensions/khr/nbody/main.cpp | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/samples/extensions/khr/conway/main.cpp b/samples/extensions/khr/conway/main.cpp index d595a367..540e14f7 100644 --- a/samples/extensions/khr/conway/main.cpp +++ b/samples/extensions/khr/conway/main.cpp @@ -363,8 +363,7 @@ void Conway::event(const sf::Event& event) animating = !animating; } break; - default: - break; + default: break; } } diff --git a/samples/extensions/khr/nbody/main.cpp b/samples/extensions/khr/nbody/main.cpp index 1482584e..e10601e6 100644 --- a/samples/extensions/khr/nbody/main.cpp +++ b/samples/extensions/khr/nbody/main.cpp @@ -421,8 +421,7 @@ void NBody::event(const sf::Event& event) dist = abs(dist); needMatrixReset = true; // view matrix need to be recalculated break; - default: - break; + default: break; } }