Skip to content

Commit

Permalink
ogr_core.h: suppress warning when building with -Wpedantic for C < 23
Browse files Browse the repository at this point in the history
Fixes #2322
  • Loading branch information
rouault committed Oct 26, 2024
1 parent a0b2ec7 commit 17faecc
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ogr/ogr_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,13 @@ typedef int OGRBoolean;
/* ogr_geometry.h related definitions. */
/* -------------------------------------------------------------------- */

#if defined(HAVE_GCC_DIAGNOSTIC_PUSH) && __STDC_VERSION__ < 202311L
// wkbPoint25D and friends cause warnings with -Wpedantic prior to C23
// Cf https://github.com/OSGeo/gdal/issues/2322
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic"
#endif

/**
* List of well known binary geometry types. These are used within the BLOBs
* but are also returned from OGRGeometry::getGeometryType() to identify the
Expand Down Expand Up @@ -512,6 +519,10 @@ typedef enum
#endif
} OGRwkbGeometryType;

#if defined(HAVE_GCC_DIAGNOSTIC_PUSH) && __STDC_VERSION__ < 202311L
#pragma GCC diagnostic pop
#endif

/* clang-format off */
/**
* Output variants of WKB we support.
Expand Down

0 comments on commit 17faecc

Please sign in to comment.