Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#3490 closed defect (worksforme)

source code levellerdataset.cpp error

Reported by: gradmeow Owned by: warmerdam
Priority: normal Milestone: 1.7.2
Component: ConfigBuild Version: 1.7.1
Severity: major Keywords: levellerdataset.cpp
Cc: rayg

Description

http://download.osgeo.org/gdal/gdal171.zip

In this release, there is a error at gdal-1.7.1\frmts\leveller\levellerdataset.cpp. In Line 171, "{ "?, kPI / 180.0, UNITLABEL_DEGREE }", lack of " after ? will result a build error.

Attachments (1)

levellerdataset.cpp (43.8 KB ) - added by gradmeow 14 years ago.
line 171

Download all attachments as: .zip

Change History (6)

by gradmeow, 14 years ago

Attachment: levellerdataset.cpp added

line 171

comment:1 by warmerdam, 14 years ago

Component: defaultConfigBuild
Milestone: 1.7.2
Priority: highestnormal
Status: newassigned

I have reviewed the code at this line, and it appears there is a UTF-8 or otherwise special character in the string constant:

warmerda@gdal64[5]% od -c
        { "°", kPI / 180.0, UNITLABEL_DEGREE },
0000000  \t   {       " 302 260   "   ,       k   P   I       /       1
0000020   8   0   .   0   ,       U   N   I   T   L   A   B   E   L   _
0000040   D   E   G   R   E   E       }   ,  \n
0000052

The solution would appear to be to replace it with a proper escape sequence rather than embedding a special character. However, this does not appear to adversely affect most compilers. What compiler are you building with? Is there anything unusual about your language/encoding environment?

comment:2 by warmerdam, 14 years ago

Cc: rayg added

comment:3 by rayg, 14 years ago

Resolution: worksforme
Status: assignedclosed

My bad. Have replaced the degree symbol with \xB0 (Unicode codepoint for the degree symbol).

comment:4 by warmerdam, 14 years ago

I have backported the patch into 1.7 branch (r19149). Ray's fix was in trunk (r19148).

I'm still interested in hearing what compiler/language environment this affected.

Thanks for the very fast fix Ray.

in reply to:  4 comment:5 by gradmeow, 14 years ago

Replying to warmerdam:

I have backported the patch into 1.7 branch (r19149). Ray's fix was in trunk (r19148).

I'm still interested in hearing what compiler/language environment this affected.

Thanks for the very fast fix Ray.

Thank you! My compiler is vc9.0 along with visual studio 2008.

Note: See TracTickets for help on using tickets.