Opened 17 years ago
Closed 9 years ago
#1741 closed defect (fixed)
[PATCH] Fixes compilation with -Wall -Werror
Reported by: | Even Rouault | Owned by: | Even Rouault |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | GDAL_Raster | Version: | svn-trunk |
Severity: | normal | Keywords: | warnings |
Cc: | warmerdam, Mateusz Łoskot, Kurt Schwehr |
Description
Most fixes are to suppress "warning: dereferencing type-punned pointer will break strict-aliasing rules", which is not always easy to do in an elegant way. One big change (in term of diff) is for frmts/aigrid/aigccitt.c where 3 arrays of structure elements missed a lot of braces.
Apart from cosmetic and boring changes, I think that I've catched a bug in the process. See :
Index: frmts/fit/fitdataset.cpp =================================================================== --- frmts/fit/fitdataset.cpp (révision 11867) +++ frmts/fit/fitdataset.cpp (copie de travail) @@ -941,7 +941,7 @@ CPLDebug("FIT", "Loading file with header version 01"); // map old style header into new header structure - FIThead01* head01 = (FIThead01*)&head; + FIThead01* head01 = (FIThead01*)head; gst_swapb(head->dataOffset); info->dataOffset = head01->dataOffset;
Attachments (1)
Change History (14)
by , 17 years ago
Attachment: | gdal_svn_suppress_warnings.patch added |
---|
comment:1 by , 17 years ago
Version: | unspecified → svn-trunk |
---|
comment:2 by , 17 years ago
Cc: | added |
---|---|
Component: | default → GDAL_Raster |
Keywords: | warnings added |
Milestone: | → 1.5.0 |
Owner: | changed from | to
comment:4 by , 17 years ago
Doh! I thought the patch only included the fitdataset.cpp change.
The changes in the various support libraries (eg. libtiff, libgeotiff, avc*) are not appropriate and should be backed out.
comment:6 by , 17 years ago
comment:8 by , 16 years ago
Cc: | added |
---|
comment:9 by , 16 years ago
Milestone: | 1.5.0 → 1.6.0 |
---|
It's too late to try and fix type punning warnings in 1.5.
comment:10 by , 15 years ago
Milestone: | 1.6.1 → 1.7.0 |
---|
Kicking this forward. If it is now just a bug for holding type punned warning fixes, maybe it should be closed and a new one created?
comment:12 by , 9 years ago
Cc: | added |
---|
Probably completely out dated but cc'ing Kurt in case he wants to extract stuff from that
comment:13 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Must be completely outdated now 7 years later and Kurt have had enough time to consider what to do.
Even, please go ahead and apply.
Thanks