Hi,
- Unused parameters in some methods are triggering compilation
warnings. Should I fix them by removing the parameter name ?
Sounds reasonable.
Really though - the binfilter is not the best place to focus cleanups
(though I appreciate it is fugly old code ;-) Most people will not want
it (only useful for decade-old binary StarOffice file formats).
Okay, but at compile time, there is really a flow of warning. So I
wanted also to work a bit on it..... That's just cleaning, not really
improving.
But when I see:
clone/filters/binfilter/bf_sc/source/core/tool/sc_token.cxx:1573:28:
warning: comparison is always false due to limited range of data type
and the source code is (it starts form line 1573......
if( n > MAXSTRLEN-1 )
/*N*/ {
/*?*/ DBG_ERRORFILE( "bad string array boundary" );
/*?*/ USHORT nDiff = n - (MAXSTRLEN-1);
/*?*/ n = MAXSTRLEN-1;
/*?*/ rStream.Read( c, n );
/*?*/ rStream.SeekRel( nDiff );
/*N*/ }
/*N*/ else
/*N*/ rStream.Read( c, n );
/*N*/ cStr[ n ] = 0;
would as cleaning be acceptable to change the code to:
/*N*/ rStream.Read( c, n );
/*N*/ cStr[ n ] = 0;
??? I wonder...
If yes, a lot of code can be removed (between 40 and 60 comparisons are
generating this warning). So I would prefer not starting and beeing told
not to touch it afterward.
Thanks
Pierre-André
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.