From 69441db0e36ad5fc6c49e3ad9dae05436dc613e9 Mon Sep 17 00:00:00 2001 From: galanca Date: Thu, 7 Apr 2022 15:02:35 -0600 Subject: [PATCH] Clean warnings in gcc11. --- src/libkiva/Geometry.cpp | 4 ++-- src/libkiva/Geometry.hpp | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libkiva/Geometry.cpp b/src/libkiva/Geometry.cpp index 50073966..c3c7c93f 100644 --- a/src/libkiva/Geometry.cpp +++ b/src/libkiva/Geometry.cpp @@ -283,7 +283,7 @@ Polygon symmetricUnit(Polygon poly) { if (isXsymm) { // Find centroid - Point centroid; + Point centroid{}; boost::geometry::centroid(poly, centroid); double centroidX = centroid.get<0>(); @@ -300,7 +300,7 @@ Polygon symmetricUnit(Polygon poly) { if (isYsymm) { // Find centroid - Point centroid; + Point centroid{}; boost::geometry::centroid(poly, centroid); double centroidY = centroid.get<1>(); diff --git a/src/libkiva/Geometry.hpp b/src/libkiva/Geometry.hpp index aa6ca201..12ec1c0a 100644 --- a/src/libkiva/Geometry.hpp +++ b/src/libkiva/Geometry.hpp @@ -17,6 +17,7 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#pragma GCC diagnostic ignored "-Wuninitialized" #pragma GCC diagnostic ignored "-Wstrict-overflow" #endif #include