clang: fix -Wunused-parameter, -Wunused-variable, -Wswitch

This commit is contained in:
wmayer
2023-03-12 14:08:31 +01:00
committed by wwmayer
parent 2a970b3045
commit 580b775690
3 changed files with 11 additions and 2 deletions

View File

@@ -83,6 +83,8 @@ GUIConsole::~GUIConsole (void)
void GUIConsole::SendLog(const std::string& notifiername, const std::string& msg, Base::LogStyle level)
{
(void) notifiername;
int color = -1;
switch(level){
case Base::LogStyle::Warning:
@@ -100,6 +102,8 @@ void GUIConsole::SendLog(const std::string& notifiername, const std::string& msg
case Base::LogStyle::Critical:
color = FOREGROUND_RED | FOREGROUND_GREEN;
break;
default:
break;
}
::SetConsoleTextAttribute(::GetStdHandle(STD_OUTPUT_HANDLE), color);
@@ -115,7 +119,7 @@ GUIConsole::~GUIConsole () {}
void GUIConsole::SendLog(const std::string& notifiername, const std::string& msg, Base::LogStyle level)
{
(void) notifiername;
switch(level){
case Base::LogStyle::Warning:
std::cerr << "Warning: " << msg;

View File

@@ -23,7 +23,6 @@
#include "PreCompiled.h"
#ifndef _PreComp_
# include <TopoDS_Wire.hxx>
# include <TopExp_Explorer.hxx>
# include <BRepAlgoAPI_Cut.hxx>
@@ -36,6 +35,8 @@
# include <Precision.hxx>
#endif
#include <boost/core/ignore_unused.hpp>
#include <App/Document.h>
#include <Base/Exception.h>
#include <Base/Reader.h>
@@ -198,6 +199,7 @@ App::DocumentObjectExecReturn *Loft::execute()
if (profilePoint.IsNull()) {
size_t numWiresAdded = addWiresToWireSections(profileShape, wiresections);
assert (numWiresAdded == wiresections.size());
boost::ignore_unused(numWiresAdded);
} else { // !profilePoint.IsNull()
for (auto &wires : wiresections)
wires.push_back(profilePoint);

View File

@@ -25,6 +25,8 @@
# include <cassert>
#endif // #ifndef _PreComp_
#include <boost/core/ignore_unused.hpp>
#include <Base/Exception.h>
#include <Base/Vector3D.h>
@@ -316,6 +318,7 @@ GeoListModel<GeometryFacadeUniquePtr>::GeoListModel(
// Under the Single Responsibility Principle GeoListModel cannot be made
// responsible for releasing those pointers.
assert(ownerT == false);
boost::ignore_unused(ownerT);
}
template <>