Opened 9 years ago
Closed 9 years ago
#5810 closed defect (fixed)
Invalid use of CSLAddString() in OGR MSSQL
Reported by: | tamas | Owned by: | tamas |
---|---|---|---|
Priority: | normal | Milestone: | 1.11.2 |
Component: | default | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
ogrmssqlspatialdatasource.cpp: In member function ‘int OGRMSSQLSpatialDataSource::Open(const char*, int, int)’: ogrmssqlspatialdatasource.cpp:730:86: warning: ignoring return value of ‘char CSLAddString(char, const char*)’, declared with attribute warn_unused_result [-Wunused-result]
CSLAddString( papszGeomColumnNames,
oStmt.GetColData(0) );
This could result in crashes, because CSLAddString() can reallocate papszGeomColumnNames and thus its return value should be assigned back to papszGeomColumnNames.
Note:
See TracTickets
for help on using tickets.
Fixed in trunk (r28315) and branch-1.11 (#28316)