Opened 18 years ago
Closed 15 years ago
#92 closed defect (fixed)
MarkupSTL.cpp - always true comparison
Reported by: | mloskot | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 3.2.0 |
Component: | tests | Version: | 2.2.2 |
Severity: | Content | Keywords: | imported, phpbugtracker |
Cc: |
Description (last modified by )
g++ with -pedantic option reports following warning that may significantly influence logic of this code:
/home/mloskot/dev/geos/_cvs/geos/tests/xmltester/markup/MarkupSTL.cpp:884: warning: comparison is always true due to limited range of data type
Here is this comparison:
int nEndCDATA = m_strDoc.find( "]]>", token.nNext ); if ( (unsigned int)nEndCDATA != string::npos && nEndCDATA < m_aPos[iPos].nEndL ) { return m_strDoc.substr(token.nL+9, nEndCDATA-token.nL-9 ); }
Attachments (1)
Change History (9)
comment:2 by , 17 years ago
Description: | modified (diff) |
---|---|
Reporter: | changed from | to
comment:3 by , 17 years ago
Milestone: | imported |
---|
comment:4 by , 16 years ago
Priority: | 2 → major |
---|---|
Severity: | Significant → Content |
comment:5 by , 16 years ago
Description: | modified (diff) |
---|---|
Owner: | removed |
Status: | assigned → new |
comment:6 by , 15 years ago
Milestone: | → 3.2.0 |
---|
comment:7 by , 15 years ago
by , 15 years ago
Attachment: | MarkupSTL_cpp-ticket-92.patch added |
---|
Patch fixing compilation warnings thrown by GCC 4.3.x
comment:8 by , 15 years ago
Sandro,
More or less. See MarkupSTL_cpp-ticket-92.patch for all fixes necessary to silent GCC.
Note:
See TracTickets
for help on using tickets.
Does casting to 'string::size_type' instead of 'unsigned int' fix the problem ?