Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compiler warnings #165

Merged
merged 1 commit into from
May 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion gz-waves/include/gz/waves/MeshTools.hh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

#include "gz/waves/CGALTypes.hh"

#include <gz/common.hh>
#include <gz/common/Mesh.hh>

namespace gz
Expand Down
2 changes: 0 additions & 2 deletions gz-waves/include/gz/waves/OceanTile.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
#include <memory>
#include <vector>

#include <gz/math.hh>
#include <gz/common.hh>
#include <gz/common/Mesh.hh>

#include "gz/waves/CGALTypes.hh"
Expand Down
2 changes: 0 additions & 2 deletions gz-waves/include/gz/waves/Wavefield.hh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
#include <memory>
#include <string>

#include <gz/math.hh>

namespace gz
{
namespace waves
Expand Down
2 changes: 1 addition & 1 deletion gz-waves/src/CGAL_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
#include "gz/waves/Wavefield.hh"
#include "gz/waves/WaveParameters.hh"

#include <gz/common.hh>
#include <gz/common/Console.hh>
#include <gz/common/Util.hh>
#include <gz/common/MeshManager.hh>
#include <gz/math/Vector3.hh>
Expand Down
2 changes: 1 addition & 1 deletion gz-waves/src/Grid.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <string>
#include <vector>

#include <gz/common.hh>
#include <gz/common/Console.hh>

#include "gz/waves/CGALTypes.hh"
#include "gz/waves/Geometry.hh"
Expand Down
2 changes: 1 addition & 1 deletion gz-waves/src/LinearRandomFFTWaveSimulation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <unordered_map>
#include <vector>

#include <gz/common.hh>
#include <gz/common/Console.hh>

#include "gz/waves/Algorithm.hh"
#include "gz/waves/Types.hh"
Expand Down
2 changes: 1 addition & 1 deletion gz-waves/src/LinearRandomFFTWaveSimulationRef.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include <complex>
#include <random>

#include <gz/common.hh>
#include <gz/common/Console.hh>

#include "gz/waves/Types.hh"
#include "LinearRandomFFTWaveSimulationRefImpl.hh"
Expand Down
4 changes: 2 additions & 2 deletions gz-waves/src/LinearRandomWaveSimulation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <random>
#include <vector>

#include <gz/common.hh>
#include <gz/common/Console.hh>

#include "gz/waves/WaveSpectrum.hh"

Expand Down Expand Up @@ -491,7 +491,7 @@ void LinearRandomWaveSimulation::SetWindVelocity(double ux, double uy)
}

//////////////////////////////////////////////////
void LinearRandomWaveSimulation::SetSteepness(double value)
void LinearRandomWaveSimulation::SetSteepness(double /*value*/) // NOLINT
{
/// \todo(srmainwaring) IMPLEMENT
}
Expand Down
2 changes: 1 addition & 1 deletion gz-waves/src/LinearRegularWaveSimulation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ void LinearRegularWaveSimulation::SetWindVelocity(double /*ux*/, double /*uy*/)
}

//////////////////////////////////////////////////
void LinearRegularWaveSimulation::SetSteepness(double value)
void LinearRegularWaveSimulation::SetSteepness(double /*value*/) // NOLINT
{
/// \todo(srmainwaring) IMPLEMENT
}
Expand Down
3 changes: 1 addition & 2 deletions gz-waves/src/MeshTools.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
#include <iterator>
#include <string>

#include <gz/common.hh>
#include <gz/math.hh>
#include <gz/common/Console.hh>

#include "gz/waves/CGALTypes.hh"

Expand Down
2 changes: 1 addition & 1 deletion gz-waves/src/MeshTools_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <iostream>
#include <string>

#include <gz/common.hh>
#include <gz/common/Console.hh>
#include <gz/common/Util.hh>
#include <gz/common/MeshManager.hh>
#include <gz/common/Mesh.hh>
Expand Down
2 changes: 1 addition & 1 deletion gz-waves/src/OceanTile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <iostream>
#include <vector>

#include <gz/common.hh>
#include <gz/common/Console.hh>
#include <gz/common/Mesh.hh>
#include <gz/common/SubMesh.hh>

Expand Down
2 changes: 1 addition & 1 deletion gz-waves/src/Physics.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
#include <limits>
#include <string>

#include <gz/common/Console.hh>
#include <gz/math/Pose3.hh>
#include <gz/math/Vector3.hh>
#include <gz/common.hh>

#include <sdf/sdf.hh>

Expand Down
2 changes: 1 addition & 1 deletion gz-waves/src/Physics_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <string>
#include <thread>

#include <gz/common.hh>
#include <gz/common/Console.hh>
#include <gz/common/Util.hh>
#include <gz/common/MeshManager.hh>
#include <gz/math/Vector3.hh>
Expand Down
28 changes: 14 additions & 14 deletions gz-waves/src/TrochoidIrregularWaveSimulation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -184,19 +184,19 @@ void TrochoidIrregularWaveSimulation::Impl::Elevation(

//////////////////////////////////////////////////
void TrochoidIrregularWaveSimulation::Impl::Pressure(
double x, double y, double z,
double &pressure)
double /*x*/, double /*y*/, double /*z*/,
double &/*pressure*/)
{
/// \todo(srmainwaring) IMPLEMENT
gzerr << "Pressure: Not implemented!\n";
}

//////////////////////////////////////////////////
void TrochoidIrregularWaveSimulation::Impl::Pressure(
const Eigen::Ref<const Eigen::ArrayXd>& x,
const Eigen::Ref<const Eigen::ArrayXd>& y,
const Eigen::Ref<const Eigen::ArrayXd>& z,
Eigen::Ref<Eigen::ArrayXd> pressure)
const Eigen::Ref<const Eigen::ArrayXd>& /*x*/,
const Eigen::Ref<const Eigen::ArrayXd>& /*y*/,
const Eigen::Ref<const Eigen::ArrayXd>& /*z*/,
Eigen::Ref<Eigen::ArrayXd> /*pressure*/)
{
/// \todo(srmainwaring) IMPLEMENT
gzerr << "Pressure: Not implemented!\n";
Expand Down Expand Up @@ -374,35 +374,35 @@ void TrochoidIrregularWaveSimulation::Impl::DisplacementDerivAt(

//////////////////////////////////////////////////
void TrochoidIrregularWaveSimulation::Impl::ElevationAt(
Index ix, Index iy,
double &h)
Index /*ix*/, Index /*iy*/,
double &/*h*/)
{
/// \todo(srmainwaring) IMPLEMENT
gzerr << "ElevationAt: Not implemented!\n";
}

//////////////////////////////////////////////////
void TrochoidIrregularWaveSimulation::Impl::DisplacementAt(
Index ix, Index iy,
double& sx, double& sy)
Index /*ix*/, Index /*iy*/,
double& /*sx*/, double& /*sy*/)
{
/// \todo(srmainwaring) IMPLEMENT
gzerr << "DisplacementAt: Not implemented!\n";
}

//////////////////////////////////////////////////
void TrochoidIrregularWaveSimulation::Impl::PressureAt(
Index ix, Index iy, Index iz,
double &pressure)
Index /*ix*/, Index /*iy*/, Index /*iz*/,
double &/*pressure*/)
{
/// \todo(srmainwaring) IMPLEMENT
gzerr << "PressureAt: Not implemented!\n";
}

//////////////////////////////////////////////////
void TrochoidIrregularWaveSimulation::Impl::PressureAt(
Index iz,
Eigen::Ref<Eigen::ArrayXXd> pressure)
Index /*iz*/,
Eigen::Ref<Eigen::ArrayXXd> /*pressure*/)
{
/// \todo(srmainwaring) IMPLEMENT
gzerr << "PressureAt: Not implemented!\n";
Expand Down
2 changes: 1 addition & 1 deletion gz-waves/src/Utilities.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <iostream>
#include <string>

#include <gz/common.hh>
#include <gz/common/Console.hh>
#include <gz/math.hh>
#include <sdf/sdf.hh>

Expand Down
2 changes: 1 addition & 1 deletion gz-waves/src/WaveParameters.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <iostream>
#include <string>

#include <gz/common.hh>
#include <gz/common/Console.hh>
#include <gz/msgs.hh>
#include <gz/math/Pose3.hh>
#include <gz/math/Vector2.hh>
Expand Down
4 changes: 2 additions & 2 deletions gz-waves/src/Wavefield.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
#include <string>
#include <thread>

#include <gz/transport.hh>
#include <gz/common/Console.hh>
#include <gz/transport/Node.hh>

#include "gz/waves/CGALTypes.hh"
#include "gz/waves/OceanTile.hh"
Expand All @@ -30,7 +31,6 @@
#include "gz/waves/Utilities.hh"
#include "gz/waves/WaveParameters.hh"


namespace gz
{
namespace waves
Expand Down
2 changes: 1 addition & 1 deletion gz-waves/src/WavefieldSampler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <iostream>
#include <string>

#include <gz/common.hh>
#include <gz/common/Console.hh>
#include <gz/math/Pose3.hh>
#include <gz/math/Vector2.hh>
#include <gz/math/Vector3.hh>
Expand Down
2 changes: 2 additions & 0 deletions gz-waves/src/systems/dynamic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ gz_add_system(dynamic-geometry
gz-rendering${GZ_RENDERING_VER}-ogre2
gz-sim${GZ_SIM_VER}::gz-sim${GZ_SIM_VER}
GzOGRE2::GzOGRE2
PRIVATE_COMPILE_DEFS
OGRE_IGNORE_UNKNOWN_DEBUG
)
7 changes: 7 additions & 0 deletions gz-waves/src/systems/waves/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ target_link_libraries(${rendering_ogre2_target}
gz-plugin${GZ_PLUGIN_VER}::register
)

# Suppress an Ogre warning about adding _DEBUG to precompiler definitions.
# TODO: set conditional on the cmake build type.
target_compile_definitions(${rendering_ogre2_target}
PUBLIC
OGRE_IGNORE_UNKNOWN_DEBUG
)

#################################################
gz_add_system(waves-visual
SOURCES
Expand Down
2 changes: 1 addition & 1 deletion gz-waves/src/systems/waves/Ogre2OceanGeometry.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "Ogre2OceanGeometry.hh"

#include <gz/common.hh>
#include <gz/common/Console.hh>
#include <gz/rendering/ogre2/Ogre2Material.hh>
#include <gz/rendering/ogre2/Ogre2Scene.hh>

Expand Down
2 changes: 1 addition & 1 deletion gz-waves/src/systems/waves/Ogre2OceanVisual.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "Ogre2OceanVisual.hh"

#include <gz/common.hh>
#include <gz/common/Console.hh>
#include <gz/common/SubMesh.hh>
#include <gz/rendering/ogre2/Ogre2Material.hh>
#include <gz/rendering/ogre2/Ogre2Scene.hh>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include <gz/common/SystemPaths.hh>
#include <gz/plugin/Loader.hh>
#include <gz/rendering/config.hh>
#include <gz/rendering/InstallationDirectories.hh>

#include "RenderEngineExtensionManager.hh"
#include "RenderEngineExtension.hh"
Expand Down Expand Up @@ -460,7 +461,7 @@ bool RenderEngineExtensionManagerPrivate::LoadExtensionPlugin(

// Add default install folder.
systemPaths.AddPluginPaths(std::string(GZ_RENDERING_PLUGIN_PATH));
systemPaths.AddPluginPaths({GZ_RENDERING_ENGINE_INSTALL_DIR});
systemPaths.AddPluginPaths(gz::rendering::getEngineInstallDir());

// Add any preset plugin paths.
for (const auto &path : this->pluginPaths)
Expand Down
19 changes: 15 additions & 4 deletions gz-waves/test/plots/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ target_link_libraries(PLOT_GnuPlotExample
target_include_directories(PLOT_GnuPlotExample
PUBLIC ${gnuplot-iostream_INCLUDE_DIRS}
)

target_compile_options(PLOT_GnuPlotExample
PRIVATE "-Wno-unused-result"
)

add_executable(PLOT_LinearRandomFFTWaves PLOT_LinearRandomFFTWaves.cc)
target_link_libraries(PLOT_LinearRandomFFTWaves
Expand All @@ -27,7 +29,9 @@ target_link_libraries(PLOT_LinearRandomFFTWaves
target_include_directories(PLOT_LinearRandomFFTWaves
PUBLIC ${gnuplot-iostream_INCLUDE_DIRS}
)

target_compile_options(PLOT_LinearRandomFFTWaves
PRIVATE "-Wno-unused-result"
)

add_executable(PLOT_LinearRandomWaves PLOT_LinearRandomWaves.cc)
target_link_libraries(PLOT_LinearRandomWaves
Expand All @@ -37,7 +41,9 @@ target_link_libraries(PLOT_LinearRandomWaves
target_include_directories(PLOT_LinearRandomWaves
PUBLIC ${gnuplot-iostream_INCLUDE_DIRS}
)

target_compile_options(PLOT_LinearRandomWaves
PRIVATE "-Wno-unused-result"
)

add_executable(PLOT_LinearRegularWaves PLOT_LinearRegularWaves.cc)
target_link_libraries(PLOT_LinearRegularWaves
Expand All @@ -47,7 +53,9 @@ target_link_libraries(PLOT_LinearRegularWaves
target_include_directories(PLOT_LinearRegularWaves
PUBLIC ${gnuplot-iostream_INCLUDE_DIRS}
)

target_compile_options(PLOT_LinearRegularWaves
PRIVATE "-Wno-unused-result"
)

add_executable(PLOT_WaveSpectrum PLOT_WaveSpectrum.cc)
target_link_libraries(PLOT_WaveSpectrum
Expand All @@ -57,6 +65,9 @@ target_link_libraries(PLOT_WaveSpectrum
target_include_directories(PLOT_WaveSpectrum
PUBLIC ${gnuplot-iostream_INCLUDE_DIRS}
)
target_compile_options(PLOT_WaveSpectrum
PRIVATE "-Wno-unused-result"
)

#============================================================================
# Install targets
Expand Down
Loading