Skip to content

Commit

Permalink
Enable and fix some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
zer011b committed May 6, 2024
1 parent 1055cdc commit d7beca2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
5 changes: 2 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -326,10 +326,9 @@ endif ()
set (WARNING_FLAGS "")
#set (WARNING_FLAGS "${WARNING_FLAGS} -Wfatal-errors")
#set (WARNING_FLAGS "${WARNING_FLAGS} -Wall -Wextra")
#set (WARNING_FLAGS "${WARNING_FLAGS} -Wformat=2 -Wformat-security -Wuninitialized")
#set (WARNING_FLAGS "${WARNING_FLAGS} -Winit-self -Wno-stack-protector")
set (WARNING_FLAGS "${WARNING_FLAGS} -Wformat=2 -Wformat-security -Wuninitialized")
set (WARNING_FLAGS "${WARNING_FLAGS} -Winit-self -Wno-stack-protector")
#set (WARNING_FLAGS "${WARNING_FLAGS} -Wconversion -Wsign-conversion")
#set (WARNING_FLAGS "${WARNING_FLAGS} -Wmissing-declarations")

if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
set (BUILD_FLAGS "${BUILD_FLAGS} -O0")
Expand Down
19 changes: 13 additions & 6 deletions Source/File-Management/Dumper/BMPDumper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,13 +209,16 @@ BMPDumper<GridCoordinate3D>::writeToFile (Grid<GridCoordinate3D> *grid, /**< gri
getMaxValues (maxRe, minRe, maxIm, minIm, maxMod, minMod,
grid, startCoord, endCoord, time_step_back);

grid_coord coordStart1, coordEnd1;
grid_coord coordStart2, coordEnd2;
grid_coord coordStart3, coordEnd3;
grid_coord coordStart1 = 0;
grid_coord coordEnd1 = 0;
grid_coord coordStart2 = 0;
grid_coord coordEnd2 = 0;
grid_coord coordStart3 = 0;
grid_coord coordEnd3 = 0;

grid_coord size1;
grid_coord size2;
grid_coord size3;
grid_coord size1 = 0;
grid_coord size2 = 0;
grid_coord size3 = 0;

if (BMPhelper.getOrthogonalAxis () == OrthogonalAxis::X)
{
Expand Down Expand Up @@ -259,6 +262,10 @@ BMPDumper<GridCoordinate3D>::writeToFile (Grid<GridCoordinate3D> *grid, /**< gri
coordEnd3 = endCoord.get2 ();
size3 = sy;
}
else
{
UNREACHABLE;
}

// Create image for current values and max/min values.
for (grid_coord coord1 = coordStart1; coord1 < coordEnd1; ++coord1)
Expand Down
2 changes: 1 addition & 1 deletion Source/Scheme/Scheme.inc.h
Original file line number Diff line number Diff line change
Expand Up @@ -4558,7 +4558,7 @@ Scheme<Type, TCoord, layout_type>::saveNTFF (bool isReverse, time_step t)
rightNTFF = rightNTFF - stepNTFF;

std::ofstream outfile;
std::ostream *outs;
std::ostream *outs = NULLPTR;
const char *strName;
FPValue start;
FPValue end;
Expand Down

0 comments on commit d7beca2

Please sign in to comment.