Skip to content

Commit

Permalink
Merge branch 'master' into i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
yoichigmf committed Jul 8, 2024
2 parents 2dc1841 + 40bdb97 commit 0592082
Show file tree
Hide file tree
Showing 206 changed files with 4,921 additions and 2,369 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/android_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/clang_static_analyzer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Run
run: docker run --rm -v $PWD:$PWD ubuntu:22.04 sh -c "cd $PWD && apt update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends sudo software-properties-common && DEBIAN_FRONTEND=noninteractive sh ./ci/travis/csa_common/before_install.sh && sh ./ci/travis/csa_common/install.sh && sh ./ci/travis/csa_common/script.sh"
12 changes: 6 additions & 6 deletions .github/workflows/cmake_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
cache-name: cmake-ubuntu-focal
steps:
- name: Checkout GDAL
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Setup cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
id: cache
Expand Down Expand Up @@ -312,7 +312,7 @@ jobs:
run: |
git config --global core.autocrlf false
- name: Checkout GDAL
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Install development packages
uses: msys2/setup-msys2@d0e80f58dffbc64f6a3a1f43527d469b4fc7b6c8 # v2.23.0
with:
Expand Down Expand Up @@ -405,7 +405,7 @@ jobs:
run: |
git config --global core.autocrlf false
- name: Checkout GDAL
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
- name: populate JAVA_HOME
shell: pwsh
Expand Down Expand Up @@ -512,7 +512,7 @@ jobs:
run: |
git config --global core.autocrlf false
- name: Checkout GDAL
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3.0.4
with:
activate-environment: gdalenv
Expand Down Expand Up @@ -589,7 +589,7 @@ jobs:
with:
xcode-version: 14.3
- name: Checkout GDAL
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Setup cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
id: cache
Expand Down Expand Up @@ -669,7 +669,7 @@ jobs:
run: |
git config --global core.autocrlf false
- name: Checkout GDAL
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3.0.4
with:
activate-environment: gdalenv
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/code_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Install Requirements
run: |
Expand All @@ -47,7 +47,7 @@ jobs:
container: ubuntu:24.04
steps:
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Install Requirements
run: |
Expand All @@ -69,7 +69,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Detect tabulations
run: ./scripts/detect_tabulations.sh
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1

Expand All @@ -113,7 +113,7 @@ jobs:
container: ghcr.io/osgeo/proj-docs
steps:
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Run doxygen
run: |
Expand All @@ -124,7 +124,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Install Requirements
run: |
Expand All @@ -143,7 +143,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up Python
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
Expand All @@ -159,7 +159,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Install requirements
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Install dependencies
run: |
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
# We do that after running CMake to avoid CodeQL to trigger during CMake time,
# in particular during HDF5 detection which is terribly slow (https://github.com/OSGeo/gdal/issues/9549)
- name: Initialize CodeQL
uses: github/codeql-action/init@f079b8493333aace61c81488f8bd40919487bd9f # v3.25.7
uses: github/codeql-action/init@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -127,6 +127,6 @@ jobs:
cmake --build build -j$(nproc)
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@f079b8493333aace61c81488f8bd40919487bd9f # v3.25.7
uses: github/codeql-action/analyze@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11
with:
category: "/language:${{matrix.language}}"
2 changes: 1 addition & 1 deletion .github/workflows/conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
CACHE_NUMBER: 0

steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Support longpaths
run: git config --system core.longpaths true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverity_scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Login to GHCR
if: env.CONTAINER_REGISTRY == 'ghcr.io'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/doc_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
container: ghcr.io/osgeo/proj-docs

steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Setup environment
shell: bash -l {0}
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ jobs:
sudo sysctl vm.mmap_rnd_bits=28
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Login to Docker Hub
if: env.CONTAINER_REGISTRY == 'docker.io'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: macos-14
steps:

- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3.0.4
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:

steps:
- name: "Checkout code"
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
persist-credentials: false

Expand Down Expand Up @@ -71,6 +71,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@f079b8493333aace61c81488f8bd40919487bd9f # v3.25.7
uses: github/codeql-action/upload-sarif@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11
with:
sarif_file: results.sarif
2 changes: 1 addition & 1 deletion .github/workflows/slow_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Login to GHCR
if: env.CONTAINER_REGISTRY == 'ghcr.io'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ubuntu_20.04/Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ RUN apt-get update -y \
libfreexl-dev \
libfyba-dev \
libgeos-dev \
libgeotiff-dev \
libgif-dev \
libhdf4-alt-dev \
libhdf5-serial-dev \
Expand Down
32 changes: 26 additions & 6 deletions .github/workflows/ubuntu_20.04/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ set -eu
export CXXFLAGS="-march=native -O2 -Wodr -flto-odr-type-merging -Werror"
export CFLAGS="-O2 -march=native -Werror"

cmake ${GDAL_SOURCE_DIR:=..} \
cmake "${GDAL_SOURCE_DIR:=..}" \
-DUSE_CCACHE=ON \
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
-DCMAKE_INSTALL_PREFIX=/usr \
-DGDAL_USE_TIFF_INTERNAL=ON \
-DGDAL_USE_GEOTIFF_INTERNAL=ON \
-DCMAKE_INSTALL_PREFIX=/tmp/install-gdal \
-DGDAL_USE_TIFF_INTERNAL=OFF \
-DGDAL_USE_GEOTIFF_INTERNAL=OFF \
-DECW_ROOT=/opt/libecwj2-3.3 \
-DMRSID_ROOT=/usr/local \
-DFileGDB_ROOT=/usr/local/FileGDB_API \
Expand All @@ -20,5 +20,25 @@ cmake ${GDAL_SOURCE_DIR:=..} \
unset CXXFLAGS
unset CFLAGS

make -j$(nproc)
make -j$(nproc) install DESTDIR=/tmp/install-gdal
make "-j$(nproc)"
make "-j$(nproc)" install

# Test building MrSID driver in standalone mode
mkdir build_mrsid
cd build_mrsid
cmake -S ${GDAL_SOURCE_DIR:=..}/frmts/mrsid -DMRSID_ROOT=/usr/local -DCMAKE_PREFIX_PATH=/tmp/install-gdal
cmake --build . "-j$(nproc)"
test -f gdal_MrSID.so
cd ..

# Test building OCI driver in standalone mode
mkdir build_oci
cd build_oci
wget https://download.oracle.com/otn_software/linux/instantclient/1923000/instantclient-basic-linux.x64-19.23.0.0.0dbru.zip
wget https://download.oracle.com/otn_software/linux/instantclient/1923000/instantclient-sdk-linux.x64-19.23.0.0.0dbru.zip
unzip -o instantclient-basic-linux.x64-19.23.0.0.0dbru.zip
unzip -o instantclient-sdk-linux.x64-19.23.0.0.0dbru.zip
cmake -S "${GDAL_SOURCE_DIR:=..}/ogr/ogrsf_frmts/oci" "-DOracle_ROOT=$PWD/instantclient_19_23" -DCMAKE_PREFIX_PATH=/tmp/install-gdal
cmake --build . "-j$(nproc)"
test -f ogr_OCI.so
cd ..
2 changes: 1 addition & 1 deletion .github/workflows/windows_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
git config --global core.autocrlf false
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Set environment
shell: pwsh
Expand Down
18 changes: 1 addition & 17 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,8 @@ define_property(
PROPERTY PLUGIN_OUTPUT_DIR
BRIEF_DOCS "Plugin modules build directories"
FULL_DOCS "Plugin modules build directories")
#
# check compiler and set preferences.
if (NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
endif()

if (NOT CMAKE_C_STANDARD)
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED ON)
endif()

#
if (MSVC)
add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
add_definitions(-DNOMINMAX)
endif ()
#
include(GdalCAndCXXStandards)
include(CheckCompilerMachineOption)
include(CheckCompilerSIMDFeature)
include(Ccache)
Expand Down
8 changes: 3 additions & 5 deletions alg/gdalchecksum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,9 @@ int CPL_STDCALL GDALChecksumImage(GDALRasterBandH hBand, int nXOff, int nYOff,
const auto IntFromDouble = [](double dfVal)
{
int nVal;
if (CPLIsNan(dfVal) || CPLIsInf(dfVal))
if (!std::isfinite(dfVal))
{
// Most compilers seem to cast NaN or Inf to 0x80000000.
// but VC7 is an exception. So we force the result
// of such a cast.
nVal = 0x80000000;
nVal = INT_MIN;
}
else
{
Expand Down Expand Up @@ -371,5 +368,6 @@ int CPL_STDCALL GDALChecksumImage(GDALRasterBandH hBand, int nXOff, int nYOff,
CPLFree(panLineData);
}

// coverity[return_overflow]
return nChecksum;
}
7 changes: 2 additions & 5 deletions alg/gdalrasterize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1559,11 +1559,8 @@ CPLErr GDALRasterizeLayers(GDALDatasetH hDS, int nBandCount, int *panBandList,
if (!(pszYChunkSize && ((nYChunkSize = atoi(pszYChunkSize))) != 0))
{
const GIntBig nYChunkSize64 = GDALGetCacheMax64() / nScanlineBytes;
const int knIntMax = std::numeric_limits<int>::max();
if (nYChunkSize64 > knIntMax)
nYChunkSize = knIntMax;
else
nYChunkSize = static_cast<int>(nYChunkSize64);
nYChunkSize = static_cast<int>(
std::min<GIntBig>(nYChunkSize64, std::numeric_limits<int>::max()));
}

if (nYChunkSize < 1)
Expand Down
5 changes: 4 additions & 1 deletion alg/gdalwarpkernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,7 @@ static CPLErr GWKRun(GDALWarpKernel *poWK, const char *pszFuncName,
job.pfnFunc = pfnFunc;
}

bool bStopFlag;
{
std::unique_lock<std::mutex> lock(psThreadData->mutex);

Expand Down Expand Up @@ -550,14 +551,16 @@ static CPLErr GWKRun(GDALWarpKernel *poWK, const char *pszFuncName,
}
}
}

bStopFlag = psThreadData->stopFlag;
}

/* -------------------------------------------------------------------- */
/* Wait for all jobs to complete. */
/* -------------------------------------------------------------------- */
psThreadData->poJobQueue->WaitCompletion();

return psThreadData->stopFlag ? CE_Failure : CE_None;
return bStopFlag ? CE_Failure : CE_None;
}

/************************************************************************/
Expand Down
Loading

0 comments on commit 0592082

Please sign in to comment.