Kaydet (Commit) a1f2f863 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

WaE: comparison is always true due to limited range of data type

Change-Id: I74d9025b37966d0a0fa1e2c0cd5cac4778f8384e
üst 3fcf0008
...@@ -79,8 +79,8 @@ static OString encodeString( const OString& rStr) ...@@ -79,8 +79,8 @@ static OString encodeString( const OString& rStr)
// short circuit for the simple non-encoded case // short circuit for the simple non-encoded case
while( --i >= 0) while( --i >= 0)
{ {
const sal_Char c = *(pChar++); const unsigned char c = (unsigned char) *(pChar++);
if( (0x00 <= c) && (c <= 0x0F)) if( c <= 0x0F )
break; break;
if( c == '%') if( c == '%')
break; break;
...@@ -93,8 +93,8 @@ static OString encodeString( const OString& rStr) ...@@ -93,8 +93,8 @@ static OString encodeString( const OString& rStr)
aEncStr.append( pChar - (nLen-i), nLen - i); aEncStr.append( pChar - (nLen-i), nLen - i);
while( --i >= 0) while( --i >= 0)
{ {
sal_Char c = *(pChar++); unsigned char c = (unsigned char) *(pChar++);
if( (0x00 <= c) && (c <= 0x0F)) if( c <= 0x0F )
{ {
aEncStr.append( '%'); aEncStr.append( '%');
c += (c <= 0x09) ? '0' : 'A'-10; c += (c <= 0x09) ? '0' : 'A'-10;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment