From 1f6defc9c7f61a6037955f9aa64a2e7bae7c9029 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Thu, 7 Nov 2024 02:26:56 +0100 Subject: [PATCH 1/2] ogr_recordbatch.h: replace pragma once by regular inclusion guard to make -Wpedantic happy --- ogr/ogr_recordbatch.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ogr/ogr_recordbatch.h b/ogr/ogr_recordbatch.h index 6fcde1405b65..48d1a8d7c874 100644 --- a/ogr/ogr_recordbatch.h +++ b/ogr/ogr_recordbatch.h @@ -19,7 +19,8 @@ // https://github.com/apache/arrow/blob/main/cpp/src/arrow/c/abi.h WARNING: DO // NOT MODIFY the content as it would break interoperability ! -#pragma once +#ifndef OGR_RECORDBATCH_H_INCLUDED +#define OGR_RECORDBATCH_H_INCLUDED /*! @cond Doxygen_Suppress */ @@ -123,3 +124,5 @@ extern "C" #endif /*! @endcond */ + +#endif // OGR_RECORDBATCH_H_INCLUDED From 8177ae3b68a2b531d35c6efc11c3818f6653764f Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Thu, 7 Nov 2024 02:27:50 +0100 Subject: [PATCH 2/2] CI: check that all our public headers can be compiled with -Wall -Wpedantic Relates to https://github.com/OSGeo/grass/issues/4585 --- autotest/postinstall/test_gdal-config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autotest/postinstall/test_gdal-config.sh b/autotest/postinstall/test_gdal-config.sh index 19a656ee04ae..e77088e12e7b 100755 --- a/autotest/postinstall/test_gdal-config.sh +++ b/autotest/postinstall/test_gdal-config.sh @@ -102,7 +102,7 @@ set -eu CXX="${CXX:-c++}" echo "Test that we can compile all headers with C++11 using ${CXX}" for i in $prefix/include/*.h; do - ${CXX} -std=c++11 -c $(${GDAL_CONFIG} --cflags) $i; + ${CXX} -Wall -Wpedantic -std=c++11 -c $(${GDAL_CONFIG} --cflags) $i; done echo "$ERRORS tests failed out of $NTESTS"