Opened 17 years ago

Last modified 17 years ago

#1373 closed defect (fixed)

ogr_gensql.cpp: warnings like warning: enumeration value ‘SWQ_BOOLEAN’ not handled in switch

Reported by: Markus Neteler Owned by: warmerdam
Priority: highest Milestone:
Component: OGR_SF Version: unspecified
Severity: blocker Keywords:
Cc:

Description

Frank,

not sure if this is a problem: Using gcc 4.1.x on Linux, these
warnings appear:

g++ -Wall -O2 -DINST_DATA=\"/usr/local/share/gdal\" -DSHAPE_ENABLED -DTAB_ENABLED -DNTF_ENABLED -DSDTS_ENABLED -DTIGER_ENABLED -DS57_ENABLED -DDGN_ENABLED -DVRT_ENABLED -DAVCBIN_ENABLED -DREC_ENABLED -DMEM_ENABLED -DCSV_ENABLED -DGML_ENABLED -DKML_ENABLED -DOGDI_ENABLED -DPG_ENABLED -DODBC_ENABLED -DPGEO_ENABLED -DSQLITE_ENABLED -I.. -I../.. -I/home/neteler/soft/gdal/port -I/home/neteler/soft/gdal/gcore -I/home/neteler/soft/gdal/alg -I/home/neteler/soft/gdal/ogr -I/home/neteler/soft/gdal/ogr/ogrsf_frmts -DOGR_ENABLED -g -I/home/neteler/soft/gdal/port -c ogr_gensql.cpp  -fPIC -DPIC -o ../o/.libs/ogr_gensql.o
ogr_gensql.cpp: In constructor ‘OGRGenSQLResultsLayer::OGRGenSQLResultsLayer(OGRDataSource*, void*, OGRGeometry*)’:
ogr_gensql.cpp:222: warning: enumeration value ‘SWQ_BOOLEAN’ not handled in switch
ogr_gensql.cpp:222: warning: enumeration value ‘SWQ_OTHER’ not handled in switch
ogr_gensql.cpp: In member function ‘OGRFeature* OGRGenSQLResultsLayer::TranslateFeature(OGRFeature*)’:
ogr_gensql.cpp:614: warning: enumeration value ‘SWQ_FLOAT’ not handled in switch
ogr_gensql.cpp:614: warning: enumeration value ‘SWQ_BOOLEAN’ not handled in switch
ogr_gensql.cpp:614: warning: enumeration value ‘SWQ_OTHER’ not handled in switch
ogr_gensql.cpp: In member function ‘void OGRGenSQLResultsLayer::CreateOrderByIndex()’:
ogr_gensql.cpp:907: warning: enumeration value ‘SWQ_FLOAT’ not handled in switch
ogr_gensql.cpp:907: warning: enumeration value ‘SWQ_BOOLEAN’ not handled in switch
ogr_gensql.cpp:907: warning: enumeration value ‘SWQ_OTHER’ not handled in switch
ogr_gensql.cpp: In member function ‘int OGRGenSQLResultsLayer::Compare(OGRField*, OGRField*)’:
ogr_gensql.cpp:1087: warning: enumeration value ‘SWQ_FLOAT’ not handled in switch
ogr_gensql.cpp:1087: warning: enumeration value ‘SWQ_BOOLEAN’ not handled in switch
ogr_gensql.cpp:1087: warning: enumeration value ‘SWQ_OTHER’ not handled in switch

Since OGR is rather free of warnings, this may indicate a problem (or not).

Best,
Markus

Change History (1)

comment:1 by warmerdam, 17 years ago

Warnings corrected - nothing serious, but some reasonable defaults have
been added.
Note: See TracTickets for help on using tickets.