Opened 16 years ago
Closed 16 years ago
#2119 closed defect (fixed)
terragen: overflow in implicit constant conversion
Reported by: | Even Rouault | Owned by: | rayg |
---|---|---|---|
Priority: | normal | Milestone: | 1.5.1 |
Component: | default | Version: | 1.4.4 |
Severity: | normal | Keywords: | terragen |
Cc: | warmerdam, Mateusz Łoskot |
Description
When compiling GDAL (1.5, and 1.4.X probably), the following warning is emitted :
terragendataset.cpp: In constructor 'TerragenDataset::TerragenDataset()': terragendataset.cpp:463: warning: overflow in implicit constant conversion
Declaration : GInt16 m_nHeightScale;
Initialization: m_nHeightScale = 65536;
Hence the warning.
Change History (7)
comment:1 by , 16 years ago
Cc: | added |
---|
comment:2 by , 16 years ago
comment:4 by , 16 years ago
rayg,
Is the r13440 changeset related to this bug? Please, may I ask for providing commit message that includes, at least, ticket number that submission refers too? Thanks!
comment:5 by , 16 years ago
Yeah, sorry about that... I realized I'd forgotten to comment just after I checked the file in. I'm used to scc systems that prompt for comments.
comment:7 by , 16 years ago
Milestone: | → 1.5.1 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
It should be safe to change the type from 16-bit to 32-bit integer. Or to change from signed 16-bit integer to unsigned that ranges from 0 to 65535 assuming value 65536 is wrong :-)