id summary reporter owner description type status priority milestone component version severity resolution keywords cc
5978 ogr_core.h <- 32 bit compatibility mkuhn warmerdam "Building QGIS produces the following warning (among similar):
{{{
/.../QGIS/src/providers/ogr/qgsogrprovider.cpp:583:10: warning: case value evaluates to 2147483655, which cannot be narrowed to type 'int' [-Wc++11-narrowing]
case wkbGeometryCollection25D: geom = ""GeometryCollection25D""; break;
}}}
As far as I understand this is caused by an enum which contains values which will result in an integer overflow on 32bit systems:
{{{
/**
* List of well known binary geometry types. These are used within the BLOBs
* but are also returned from OGRGeometry::getGeometryType() to identify the
* type of a geometry object.
*/
typedef enum
{
wkbUnknown = 0, /**< unknown type, non-standard */
wkbPoint = 1, /**< 0-dimensional geometric object, standard WKB */
wkbLineString = 2, /**< 1-dimensional geometric object with linear
* interpolation between Points, standard WKB */
wkbPolygon = 3, /**< planar 2-dimensional geometric object defined
* by 1 exterior boundary and 0 or more interior
* boundaries, standard WKB */
wkbMultiPoint = 4, /**< GeometryCollection of Points, standard WKB */
wkbMultiLineString = 5, /**< GeometryCollection of LineStrings, standard WKB */
wkbMultiPolygon = 6, /**< GeometryCollection of Polygons, standard WKB */
wkbGeometryCollection = 7, /**< geometric object that is a collection of 1
or more geometric objects, standard WKB */
wkbNone = 100, /**< non-standard, for pure attribute records */
wkbLinearRing = 101, /**< non-standard, just for createGeometry() */
wkbPoint25D = 0x80000001, /**< 2.5D extension as per 99-402 */
wkbLineString25D = 0x80000002, /**< 2.5D extension as per 99-402 */
wkbPolygon25D = 0x80000003, /**< 2.5D extension as per 99-402 */
wkbMultiPoint25D = 0x80000004, /**< 2.5D extension as per 99-402 */
wkbMultiLineString25D = 0x80000005, /**< 2.5D extension as per 99-402 */
wkbMultiPolygon25D = 0x80000006, /**< 2.5D extension as per 99-402 */
wkbGeometryCollection25D = 0x80000007 /**< 2.5D extension as per 99-402 */
} OGRwkbGeometryType;
}}}
Would it hurt to lower these values so they are in the range of a 32-bit integer?" defect closed normal closed_because_of_github_migration default unspecified normal wontfix