To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=83012
Issue #|83012
Summary|WaE on 64bit Linux: framework
Component|framework
Version|680m207
Platform|Opteron/x86_64
URL|
OS/Version|Linux
Status|NEW
Status whiteboard|
Keywords|
Resolution|
Issue type|DEFECT
Priority|P3
Subcomponent|code
Assigned to|tm
Reported by|pjanik
------- Additional comments from [EMAIL PROTECTED] Fri Oct 26 18:06:10 +0000
2007 -------
Hi,
module framework is not warning free on unxlngx6 (64bit Linux).
12x warning like this:
/home/oo/BuildDir/ooo_SRC680_m234_src/framework/source/xml/eventsdocumenthandler.cxx:441:
warning: format '%ld' expects type 'long int', but argument 4 has type
'sal_Int32'
As there are 12 instances of this line spread over the module framework:
snprintf( buffer, sizeof(buffer), "Line: %ld - ",
m_xLocator->getLineNumber() );
which emits warning because getLineNumber returns sal_Int32 which is NOT long
on 64bit, but int...
can we somehow refactor this?
The fix for this is:
- snprintf( buffer, sizeof(buffer), "Line: %ld - ",
m_xLocator->getLineNumber() );
+ snprintf( buffer, sizeof(buffer), "Line: %ld - ",
static_cast<long>(m_xLocator-
>getLineNumber()) );
The other warnings come from these files/lines:
framework/source/uielement/toolbarmanager.cxx, lines 1878 and 1892:
aPoint.X = aPoint.Y = LONG_MAX;
framework/source/layoutmanager/layoutmanager.cxx, lines (in SRC680_m234):
2651: warning: overflow in implicit constant conversion:
sal_Int32 nMinRowCol( LONG_MAX );
2x 3024: warning: comparison is always false due to limited range of data type:
if (( aDockedPos.X == LONG_MAX ) && ( aDockedPos.Y == LONG_MAX ))
2x 4820: warning: comparison is always true due to limited range of data type:
if (( Pos.X != LONG_MAX ) && ( Pos.Y != LONG_MAX ))
4928: warning: overflow in implicit constant conversion
aPoint.X = aPoint.Y = LONG_MAX;
So: all in all, it is almost clean - only two types of issues. What to use
instead of LONG_MAX?
---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]