Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi Winfried,

On Tuesday, 2013-08-27 06:48:28 -0700, Winfried Donkers wrote:

commit e5321437322fd812b93fee266af309e782479488
Author: Winfried Donkers <winfrieddonkers@libreoffice.org>
Date:   Thu Aug 22 17:03:58 2013 +0200

    get rid of unnecessary warning
    
    A value of 0 for Opcode eOp produces a debug assertion that is
    not in place as opcode with value does exist (ocPush, SC_OPCODE_PUSH).

--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -488,8 +488,8 @@ uno::Sequence< sheet::FormulaOpCodeMapEntry > 
FormulaCompiler::OpCodeMap::create
 
 void FormulaCompiler::OpCodeMap::putOpCode( const String & rStr, const OpCode eOp )
 {
-    DBG_ASSERT( 0 < eOp && sal_uInt16(eOp) < mnSymbols, "OpCodeMap::putOpCode: OpCode out of 
range");
-    if (0 < eOp && sal_uInt16(eOp) < mnSymbols)
+    DBG_ASSERT( sal_uInt16(eOp) < mnSymbols, "OpCodeMap::putOpCode: OpCode out of range");
+    if (sal_uInt16(eOp) < mnSymbols)
     {

When did you encounter that warning?
Putting ocPush into an OpCodeMap probably indicates an error, as ocPush
is not an operator or function that maps to any string. An ocPush is
always used with a cell reference, fixed value or function result.
Unless there is a compelling reason for this change I suggest to revert it.

  Eike

-- 
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GPG key ID: 0x65632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
For key transition see http://erack.de/key-transition-2013-01-10.txt.asc
Support the FSFE, care about Free Software! https://fsfe.org/support/?erack

Attachment: pgpDNcVYbbYyE.pgp
Description: PGP signature


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.