summaryrefslogtreecommitdiff
path: root/basic/source/comp/loops.cxx
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2006-06-19 16:42:17 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2006-06-19 16:42:17 +0000
commitd37333fb86bf7ad951a6c2ed45878f7db35ee824 (patch)
treeaeea918f3eb338139f063ef7bea8b659fc3fdfbd /basic/source/comp/loops.cxx
parent7f0891180ed6cb7c388cf7fe418031523728844d (diff)
INTEGRATION: CWS warnings01 (1.4.8); FILE MERGED
2006/05/23 19:08:06 sb 1.4.8.4: RESYNC: (1.7-1.8); FILE MERGED 2005/12/01 14:55:57 ab 1.4.8.3: #i53898# Removed warnings for unxlngi6 2005/11/07 17:34:23 pl 1.4.8.2: RESYNC: (1.4-1.7); FILE MERGED 2005/11/07 12:02:45 ab 1.4.8.1: #i53898# Removed warnings
Diffstat (limited to 'basic/source/comp/loops.cxx')
-rw-r--r--basic/source/comp/loops.cxx31
1 files changed, 15 insertions, 16 deletions
diff --git a/basic/source/comp/loops.cxx b/basic/source/comp/loops.cxx
index f500954b06af..ea61af8ecec8 100644
--- a/basic/source/comp/loops.cxx
+++ b/basic/source/comp/loops.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: loops.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: vg $ $Date: 2006-04-07 14:02:06 $
+ * last change: $Author: hr $ $Date: 2006-06-19 17:42:17 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -34,14 +34,13 @@
************************************************************************/
#include "sbcomp.hxx"
-#pragma hdrstop
// Single-line IF und Multiline IF
void SbiParser::If()
{
USHORT nEndLbl;
- SbiToken eTok;
+ SbiToken eTok = NIL;
// Ende-Tokens ignorieren:
SbiExpression aCond( this );
aCond.Gen();
@@ -163,7 +162,6 @@ void SbiParser::NoIf()
void SbiParser::DoLoop()
{
USHORT nStartLbl = aGen.GetPC();
- USHORT nEndChain = 0;
OpenBlock( DO );
SbiToken eTok = Next();
if( IsEoln( eTok ) )
@@ -323,7 +321,8 @@ void SbiParser::OnGoto()
short nLbl = 0;
do
{
- SbiToken eTok2 = Next(); // Label holen
+ SbiToken eTok2 = NIL;
+ eTok2 = Next(); // Label holen
if( MayBeLabel() )
{
USHORT nOff = pProc->GetLabels().Reference( aSym );
@@ -371,7 +370,7 @@ void SbiParser::Select()
{
TestToken( CASE );
SbiExpression aCase( this );
- SbiToken eTok;
+ SbiToken eTok = NIL;
aCase.Gen();
aGen.Gen( _CASE );
TestEoln();
@@ -400,19 +399,19 @@ void SbiParser::Select()
{
if( bElse )
Error( SbERR_SYNTAX );
- SbiToken eTok = Peek();
- if( eTok == IS || ( eTok >= EQ && eTok <= GE ) )
+ SbiToken eTok2 = Peek();
+ if( eTok2 == IS || ( eTok2 >= EQ && eTok2 <= GE ) )
{ // CASE [IS] operator expr
- if( eTok == IS )
+ if( eTok2 == IS )
Next();
- eTok = Peek();
- if( eTok < EQ || eTok > GE )
+ eTok2 = Peek();
+ if( eTok2 < EQ || eTok2 > GE )
Error( SbERR_SYNTAX );
else Next();
SbiExpression aCompare( this );
aCompare.Gen();
nTrueTarget = aGen.Gen( _CASEIS, nTrueTarget,
- SbxEQ + ( eTok - EQ ) );
+ SbxEQ + ( eTok2 - EQ ) );
}
else
{ // CASE expr | expr TO expr
@@ -490,7 +489,7 @@ void SbiParser::On()
{
// ON ERROR GOTO label|0
Next();
- bool bError = false;
+ bool bError_ = false;
if( MayBeLabel() )
{
if( eCurTok == NUMBER && !nVal )
@@ -507,9 +506,9 @@ void SbiParser::On()
if( eCurTok == NUMBER && nVal == 1 )
aGen.Gen( _STDERROR );
else
- bError = true;
+ bError_ = true;
}
- if( bError )
+ if( bError_ )
Error( SbERR_LABEL_EXPECTED );
}
else if( eCurTok == RESUME )