You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by hd...@apache.org on 2013/05/15 11:22:51 UTC
svn commit: r1482736 - /openoffice/trunk/main/sal/inc/rtl/string.hxx
Author: hdu
Date: Wed May 15 09:22:51 2013
New Revision: 1482736
URL: http://svn.apache.org/r1482736
Log:
#i122208# avoid signedness warnings in signed-char build environments
Modified:
openoffice/trunk/main/sal/inc/rtl/string.hxx
Modified: openoffice/trunk/main/sal/inc/rtl/string.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sal/inc/rtl/string.hxx?rev=1482736&r1=1482735&r2=1482736&view=diff
==============================================================================
--- openoffice/trunk/main/sal/inc/rtl/string.hxx (original)
+++ openoffice/trunk/main/sal/inc/rtl/string.hxx Wed May 15 09:22:51 2013
@@ -947,7 +947,7 @@ struct CStringHash
size_t operator()( const char* p) const {
size_t n = 0;
while( *p)
- n += 4*n + *(p++);
+ n += 4*n + *static_cast<unsigned char*>(p++);
return n;
}
};
Re: svn commit: r1482736 - /openoffice/trunk/main/sal/inc/rtl/string.hxx
Posted by Herbert Dürr <hd...@apache.org>.
On 2013/05/16 1:23 AM, Ariel Constenla-Haile wrote:
> On Wed, May 15, 2013 at 09:22:51AM -0000, hdu@apache.org wrote:
>> [...]
>> #i122208# avoid signedness warnings in signed-char build environments
> [...]
> This breaks on Linux:
Sorry about that. Fixed in r1483216.
Herbert
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org
Re: svn commit: r1482736 - /openoffice/trunk/main/sal/inc/rtl/string.hxx
Posted by Pavel Janík <Pa...@Janik.cz>.
>> - n += 4*n + *(p++);
>> + n += 4*n + *static_cast<unsigned char*>(p++);
>
> This breaks on Linux:
>
> Compiling: sal/osl/unx/file.cxx
>
> In file included from ../../inc/rtl/ustring.hxx:33:0,
> from ../../inc/osl/file.hxx:33,
> from sal/osl/unx/file.cxx:27:
> ../../inc/rtl/string.hxx: In member function 'size_t rtl::CStringHash::operator()(const char*) const':
> ../../inc/rtl/string.hxx:950:47: error: invalid static_cast from type 'const char*' to type 'unsigned char*'
> dmake: Error code 1, while making '../../unxlngx6/obj/file.obj'
> ERROR: error 65280 occurred while making sal/osl/unx
The same with gcc version 4.0.1 (Apple Inc. build 5494).
--
Pavel Janík
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org
Re: svn commit: r1482736 -
/openoffice/trunk/main/sal/inc/rtl/string.hxx
Posted by Ariel Constenla-Haile <ar...@apache.org>.
On Wed, May 15, 2013 at 09:22:51AM -0000, hdu@apache.org wrote:
> Author: hdu
> Date: Wed May 15 09:22:51 2013
> New Revision: 1482736
>
> URL: http://svn.apache.org/r1482736
> Log:
> #i122208# avoid signedness warnings in signed-char build environments
>
> Modified:
> openoffice/trunk/main/sal/inc/rtl/string.hxx
>
> Modified: openoffice/trunk/main/sal/inc/rtl/string.hxx
> URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sal/inc/rtl/string.hxx?rev=1482736&r1=1482735&r2=1482736&view=diff
> ==============================================================================
> --- openoffice/trunk/main/sal/inc/rtl/string.hxx (original)
> +++ openoffice/trunk/main/sal/inc/rtl/string.hxx Wed May 15 09:22:51 2013
> @@ -947,7 +947,7 @@ struct CStringHash
> size_t operator()( const char* p) const {
> size_t n = 0;
> while( *p)
> - n += 4*n + *(p++);
> + n += 4*n + *static_cast<unsigned char*>(p++);
This breaks on Linux:
Compiling: sal/osl/unx/file.cxx
In file included from ../../inc/rtl/ustring.hxx:33:0,
from ../../inc/osl/file.hxx:33,
from sal/osl/unx/file.cxx:27:
../../inc/rtl/string.hxx: In member function 'size_t rtl::CStringHash::operator()(const char*) const':
../../inc/rtl/string.hxx:950:47: error: invalid static_cast from type 'const char*' to type 'unsigned char*'
dmake: Error code 1, while making '../../unxlngx6/obj/file.obj'
ERROR: error 65280 occurred while making sal/osl/unx
Regards
--
Ariel Constenla-Haile
La Plata, Argentina