diff options
author | Noel Grandin <noel@peralex.com> | 2015-02-11 13:20:49 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-02-23 09:26:58 +0200 |
commit | ba233e87efddf0a6751b35784dca1c805364ff3b (patch) | |
tree | 9d7c8a4256e688c2d47cb6ecf580ac196c4da2c0 /rsc | |
parent | a2fa9e2468aa5c4fd4b610c5d0ebc8959e87a072 (diff) |
remove unnecessary parenthesis in return statements
found with
$ git grep -lP 'return\s*\(\s*\w+\s*\)\s*;'
Change-Id: Ic51606877a9edcadeb647c5bf17bc928b69ab60e
Diffstat (limited to 'rsc')
-rw-r--r-- | rsc/inc/rscclobj.hxx | 14 | ||||
-rw-r--r-- | rsc/inc/rscerror.h | 2 | ||||
-rw-r--r-- | rsc/inc/rscflag.hxx | 11 | ||||
-rw-r--r-- | rsc/inc/rscpar.hxx | 12 | ||||
-rw-r--r-- | rsc/inc/rsctools.hxx | 12 | ||||
-rw-r--r-- | rsc/source/parser/rsckey.cxx | 6 | ||||
-rw-r--r-- | rsc/source/parser/rsclex.cxx | 10 | ||||
-rw-r--r-- | rsc/source/prj/gui.cxx | 4 | ||||
-rw-r--r-- | rsc/source/prj/start.cxx | 2 | ||||
-rw-r--r-- | rsc/source/res/rsccont.cxx | 6 | ||||
-rw-r--r-- | rsc/source/res/rscrange.cxx | 2 | ||||
-rw-r--r-- | rsc/source/res/rscstr.cxx | 2 | ||||
-rw-r--r-- | rsc/source/rscpp/cpp1.c | 2 | ||||
-rw-r--r-- | rsc/source/rscpp/cpp2.c | 20 | ||||
-rw-r--r-- | rsc/source/rscpp/cpp3.c | 2 | ||||
-rwxr-xr-x | rsc/source/rscpp/cpp4.c | 4 | ||||
-rw-r--r-- | rsc/source/rscpp/cpp5.c | 62 | ||||
-rwxr-xr-x | rsc/source/rscpp/cpp6.c | 44 | ||||
-rw-r--r-- | rsc/source/tools/rscchar.cxx | 2 |
19 files changed, 108 insertions, 111 deletions
diff --git a/rsc/inc/rscclobj.hxx b/rsc/inc/rscclobj.hxx index a66959b3425f..674b6b196486 100644 --- a/rsc/inc/rscclobj.hxx +++ b/rsc/inc/rscclobj.hxx @@ -38,21 +38,21 @@ public: ObjNode( const RscId & rId, CLASS_DATA pData, sal_uLong lKey ); ObjNode * DelObjNode( RscTop * pClass, sal_uLong lFileKey ); sal_uInt32 GetId() const SAL_OVERRIDE; - RscId GetRscId(){ return( aRscId ); } + RscId GetRscId(){ return aRscId; } sal_uLong GetFileKey(){ return lFileKey; }; ObjNode* Search( const RscId &rName ) const //< search the index in the b-tree { - return( static_cast<ObjNode *>(IdNode::Search( rName )) ); + return static_cast<ObjNode *>(IdNode::Search( rName )); } bool Insert( ObjNode* pTN ) //< insert a new node in the b-tree { - return( IdNode::Insert( (IdNode *)pTN ) ); + return IdNode::Insert( (IdNode *)pTN ); } CLASS_DATA GetRscObj() //< get the Object from this Node { - return( pRscObj ); + return pRscObj; } bool IsConsistent(); }; @@ -72,11 +72,11 @@ public: sal_uInt32 GetId() const SAL_OVERRIDE; RefNode* Search( Atom typ ) const //< search the index in the b-tree { - return( static_cast<RefNode *>(IdNode::Search( typ )) ); + return static_cast<RefNode *>(IdNode::Search( typ )); } bool Insert( RefNode* pTN ) //< insert a new node in the b-tree { - return( IdNode::Insert( (IdNode *)pTN ) ); + return IdNode::Insert( (IdNode *)pTN ); } bool PutObjNode( ObjNode * pPutObject ); @@ -86,7 +86,7 @@ public: ObjNode * GetObjNode() { // hole pObjBiTree - return( pObjBiTree ); + return pObjBiTree; } }; diff --git a/rsc/inc/rscerror.h b/rsc/inc/rscerror.h index 7954cf4cdf46..754e71e60b01 100644 --- a/rsc/inc/rscerror.h +++ b/rsc/inc/rscerror.h @@ -93,7 +93,7 @@ public: ERRTYPE( sal_uInt32 nErr ) { nError = nErr; } ERRTYPE( const ERRTYPE & rErr ) { nError = rErr.nError; } ERRTYPE& operator = ( const ERRTYPE & rError ); - operator sal_uInt32() const { return( nError ); } + operator sal_uInt32() const { return nError; } bool IsError() const { return nError <= ERR_ERROREND; } bool IsOk() const { return !IsError(); } bool IsWarning() const { return nError >= ERR_WARNINGSTART && nError <= ERR_WARNINGEND;} diff --git a/rsc/inc/rscflag.hxx b/rsc/inc/rscflag.hxx index 875ebadabf92..cb10c496d705 100644 --- a/rsc/inc/rscflag.hxx +++ b/rsc/inc/rscflag.hxx @@ -71,11 +71,11 @@ public: Atom nConstantId ); virtual RSCCLASS_TYPE GetClassType() const SAL_OVERRIDE; RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, bool ) SAL_OVERRIDE; - sal_uInt32 Size() SAL_OVERRIDE { return( pRefClass->Size() ); }; + sal_uInt32 Size() SAL_OVERRIDE { return pRefClass->Size(); } // Eine Zuweisung an eine Variable bool IsDefault( const RSCINST & rInst ) SAL_OVERRIDE { - return( pRefClass->IsDefault( rInst, nConstId ) ); + return pRefClass->IsDefault( rInst, nConstId ); }; // Als Default setzen bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ) SAL_OVERRIDE @@ -86,15 +86,14 @@ public: ERRTYPE SetBool( const RSCINST & rInst, bool bValue ) SAL_OVERRIDE { if( bValue ) - return( pRefClass->SetConst( rInst, nConstId, sal_Int32(bValue) ) ); + return pRefClass->SetConst( rInst, nConstId, sal_Int32(bValue) ); else - return( pRefClass-> - SetNotConst( rInst, nConstId ) ); + return pRefClass->SetNotConst( rInst, nConstId ); } ERRTYPE GetBool( const RSCINST & rInst, bool * pB ) SAL_OVERRIDE { *pB = pRefClass->IsSet( rInst, nConstId ); - return( ERR_OK ); + return ERR_OK; } void WriteSrc( const RSCINST & rInst, FILE * fOutput, RscTypCont * pTC, sal_uInt32 nTab, const char * ) SAL_OVERRIDE; diff --git a/rsc/inc/rscpar.hxx b/rsc/inc/rscpar.hxx index 0b9bc4cb0afc..90c9eee5589a 100644 --- a/rsc/inc/rscpar.hxx +++ b/rsc/inc/rscpar.hxx @@ -54,12 +54,12 @@ public: ~RscFileInst(); bool IsEof() const { return bEof; } void SetFileIndex( sal_uLong lFIndex ) { lFileIndex = lFIndex; } - sal_uLong GetFileIndex() { return( lFileIndex ); } - sal_uLong GetSrcIndex() { return( lSrcIndex ); } - void SetLineNo( sal_uInt32 nLine ) { nLineNo = nLine; } - sal_uInt32 GetLineNo() { return( nLineNo ); } - sal_uInt32 GetScanPos() { return( nScanPos ); } - char * GetLine() { return( pLine ); } + sal_uLong GetFileIndex() { return lFileIndex; } + sal_uLong GetSrcIndex() { return lSrcIndex; } + void SetLineNo( sal_uInt32 nLine ) { nLineNo = nLine; } + sal_uInt32 GetLineNo() { return nLineNo; } + sal_uInt32 GetScanPos() { return nScanPos; } + char * GetLine() { return pLine; } int GetChar(); int GetFastChar() { diff --git a/rsc/inc/rsctools.hxx b/rsc/inc/rsctools.hxx index e7cde4a8aa84..f8d50c02e077 100644 --- a/rsc/inc/rsctools.hxx +++ b/rsc/inc/rsctools.hxx @@ -73,13 +73,11 @@ public: RscPtrPtr(); ~RscPtrPtr(); void Reset(); - sal_uInt32 Append( void * ); - sal_uInt32 Append( char * pStr ){ - return( Append( (void *)pStr ) ); - }; - sal_uInt32 GetCount(){ return( nCount ); }; + sal_uInt32 Append( void * ); + sal_uInt32 Append( char * pStr ) { return Append( (void *)pStr ); } + sal_uInt32 GetCount() { return nCount; } void * GetEntry( sal_uInt32 nEle ); - void ** GetBlock(){ return( pMem ); }; + void ** GetBlock() { return pMem; } }; class RscWriteRc @@ -124,7 +122,7 @@ public: RSCBYTEORDER_TYPE GetByteOrder() const { return nByteOrder; } - sal_uInt32 Size(){ return( nLen ); }; + sal_uInt32 Size(){ return nLen; } void Put( sal_uInt64 lVal ) { union diff --git a/rsc/source/parser/rsckey.cxx b/rsc/source/parser/rsckey.cxx index ef3488e4fb98..b60a290362e4 100644 --- a/rsc/source/parser/rsckey.cxx +++ b/rsc/source/parser/rsckey.cxx @@ -37,11 +37,11 @@ extern "C" { int SAL_CALL KeyCompare( const void * pFirst, const void * pSecond ) { if( ((KEY_STRUCT *)pFirst)->nName > ((KEY_STRUCT *)pSecond)->nName ) - return( 1 ); + return 1; else if( ((KEY_STRUCT *)pFirst)->nName < ((KEY_STRUCT *)pSecond)->nName ) - return( -1 ); + return -1; else - return( 0 ); + return 0; } RscNameTable::RscNameTable() diff --git a/rsc/source/parser/rsclex.cxx b/rsc/source/parser/rsclex.cxx index c5d3a195e646..6f906e67a746 100644 --- a/rsc/source/parser/rsclex.cxx +++ b/rsc/source/parser/rsclex.cxx @@ -143,7 +143,7 @@ int MakeToken( YYSTYPE * pTokenVal ) c = pFI->GetFastChar(); } else - return( c1 ); + return c1; } else break; @@ -152,7 +152,7 @@ int MakeToken( YYSTYPE * pTokenVal ) // FIXME: wtf is this supposed to do? if( (c != 0) == pFI->IsEof() ) { - return( 0 ); + return 0; } if( bLastInclude ) @@ -169,7 +169,7 @@ int MakeToken( YYSTYPE * pTokenVal ) } c = pFI->GetFastChar(); pTokenVal->string = const_cast<char*>(pStringContainer->putString( aBuf.getStr() )); - return( INCLUDE_STRING ); + return INCLUDE_STRING; } } @@ -213,7 +213,7 @@ int MakeToken( YYSTYPE * pTokenVal ) if (isdigit (c)) { pTokenVal->value = GetNumber(); - return( NUMBER ); + return NUMBER; } if( isalpha (c) || (c == '_') ) @@ -419,7 +419,7 @@ ERRTYPE parser( RscFileInst * pFileInst ) if( pFileInst->pTypCont->pEH->nErrors ) aError = ERR_ERROR; pFileInst->SetError( aError ); - return( aError ); + return aError; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/rsc/source/prj/gui.cxx b/rsc/source/prj/gui.cxx index f0801a8dffea..89d5d6e9e89c 100644 --- a/rsc/source/prj/gui.cxx +++ b/rsc/source/prj/gui.cxx @@ -71,9 +71,9 @@ int rsc2_main( int argc, char **argv ) delete pHS; // wird durch InitRscCompiler erzeugt if( aError.IsOk() ) - return( 0 ); + return 0; else - return( 1 ); + return 1; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/rsc/source/prj/start.cxx b/rsc/source/prj/start.cxx index fd2de9478a2b..af2da38984ab 100644 --- a/rsc/source/prj/start.cxx +++ b/rsc/source/prj/start.cxx @@ -235,7 +235,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) if( pStr ) { printf( "Cannot open response file <%s>\n", pStr ); - return( 1 ); + return 1; }; ppStr = (char **)aCmdLine.GetBlock(); diff --git a/rsc/source/res/rsccont.cxx b/rsc/source/res/rsccont.cxx index 03730eeaa07f..917f64df9bb1 100644 --- a/rsc/source/res/rsccont.cxx +++ b/rsc/source/res/rsccont.cxx @@ -148,7 +148,7 @@ RSCINST RscBaseCont::SearchElePos( const RSCINST & rInst, const RscId & rEleName if( pClassData->pEntries[ i ].aName == rEleName && pClassData->pEntries[ i ].aInst.pClass == pClass ) { - return( pClassData->pEntries[ i ].aInst ); + return pClassData->pEntries[ i ].aInst; } } } @@ -261,7 +261,7 @@ RSCINST RscBaseCont::GetPosEle( const RSCINST & rInst, sal_uInt32 nPos ) pClassData = reinterpret_cast<RscBaseContInst *>(rInst.pData + nOffInstData); if( nPos < pClassData->nEntries ) - return( pClassData->pEntries[ nPos ].aInst ); + return pClassData->pEntries[ nPos ].aInst; return RSCINST(); } @@ -588,7 +588,7 @@ bool RscBaseCont::IsDefault( const RSCINST & rInst ) if( ! pClassData->pEntries[ i ].aInst.pClass-> IsDefault( pClassData->pEntries[ i ].aInst ) ) { - return( false ); + return false; } } diff --git a/rsc/source/res/rscrange.cxx b/rsc/source/res/rscrange.cxx index 40af08f8265e..07b914c12ab6 100644 --- a/rsc/source/res/rscrange.cxx +++ b/rsc/source/res/rscrange.cxx @@ -179,7 +179,7 @@ bool RscLongRange::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ) ERRTYPE RscLongRange::SetNumber( const RSCINST & rInst, sal_Int32 nValue ) { if( nMax < nValue || nMin > nValue ) - return( ERR_RSCRANGE_OUTDEFSET ); + return ERR_RSCRANGE_OUTDEFSET; void * pData = &reinterpret_cast<RscLongRangeInst*>(rInst.pData)->nValue; memcpy( pData, &nValue, sizeof( sal_Int32 ) ); diff --git a/rsc/source/res/rscstr.cxx b/rsc/source/res/rscstr.cxx index 8fe77e8c3850..3dbb9e308c0d 100644 --- a/rsc/source/res/rscstr.cxx +++ b/rsc/source/res/rscstr.cxx @@ -89,7 +89,7 @@ ERRTYPE RscString::SetRef( const RSCINST & rInst, const RscId & rRefId ) reinterpret_cast<RscStringInst *>(rInst.pData)->bDflt = false; } else - return( ERR_REFNOTALLOWED ); + return ERR_REFNOTALLOWED; return ERR_OK; } diff --git a/rsc/source/rscpp/cpp1.c b/rsc/source/rscpp/cpp1.c index 7f2dce10c4f9..795bbab1e152 100644 --- a/rsc/source/rscpp/cpp1.c +++ b/rsc/source/rscpp/cpp1.c @@ -353,7 +353,7 @@ int MAIN(int argc, char** argv) } if( pfargv ) free(pfargv); - return( IO_NORMAL ); + return IO_NORMAL; } diff --git a/rsc/source/rscpp/cpp2.c b/rsc/source/rscpp/cpp2.c index a0f3433dc4e5..e38914a75b45 100644 --- a/rsc/source/rscpp/cpp2.c +++ b/rsc/source/rscpp/cpp2.c @@ -70,7 +70,7 @@ int control(int counter) c = skipws(); if (c == '\n' || c == EOF_CHAR) - return (counter + 1); + return counter + 1; if (!isdigit(c)) scanid(c); /* Get #word to token[] */ else @@ -131,7 +131,7 @@ int control(int counter) case L_assert: /* compiling. */ case L_error: /* BP 5.3.92, #error */ dump_line: skipnl(); /* Ignore rest of line */ - return (counter + 1); + return counter + 1; } } /* @@ -299,7 +299,7 @@ int control(int counter) skipnl(); } } - return (counter + 1); + return counter + 1; } /* @@ -466,7 +466,7 @@ FILE_LOCAL int openinclude(char* filename, int searchlocal) } #endif if (openfile(tmpname)) - return (TRUE); + return TRUE; } /* * Look in any directories specified by -I command line @@ -494,10 +494,10 @@ FILE_LOCAL int openinclude(char* filename, int searchlocal) sprintf(tmpname, "%s%s", *incptr, filename); #endif if (openfile(tmpname)) - return (TRUE); + return TRUE; } } - return (FALSE); + return FALSE; } /* @@ -511,7 +511,7 @@ FILE_LOCAL int hasdirectory(char* source, char* result, int max) char* tp; if ((tp = strrchr(source, '/')) == NULL) - return (FALSE); + return FALSE; else { int len = (int)(tp - source); @@ -524,7 +524,7 @@ FILE_LOCAL int hasdirectory(char* source, char* result, int max) { cfatal("Filename work buffer overflow", NULLST); } - return (TRUE); + return TRUE; } #else /* @@ -537,13 +537,13 @@ FILE_LOCAL int hasdirectory(char* source, char* result, int max) if ((tp = strrchr(source, ']')) == NULL && (tp = strrchr(source, ':')) == NULL) { - return (FALSE); + return FALSE; } else { strncpy(result, source, tp - source + 1); result[tp - source + 1] = EOS; - return (TRUE); + return TRUE; } #endif } diff --git a/rsc/source/rscpp/cpp3.c b/rsc/source/rscpp/cpp3.c index 1ab88163ac1c..ab3eea18e4e5 100644 --- a/rsc/source/rscpp/cpp3.c +++ b/rsc/source/rscpp/cpp3.c @@ -149,7 +149,7 @@ int AddInclude( char* pIncStr ) pIncPos = strtok( NULL, ";" ); } /* coverity[leaked_storage] - we know this leaks, but it doesn't matter in this short lived utility */ - return( 1 ); + return 1; } /* diff --git a/rsc/source/rscpp/cpp4.c b/rsc/source/rscpp/cpp4.c index 03f35604a562..daa91735f6cc 100755 --- a/rsc/source/rscpp/cpp4.c +++ b/rsc/source/rscpp/cpp4.c @@ -484,7 +484,7 @@ FILE_LOCAL int expcollect() if (c == EOF_CHAR) { cerror("end of file within macro argument", NULLST); - return (FALSE); /* Sorry. */ + return FALSE; /* Sorry. */ } else if (c == '\\') /* Quote next character */ { @@ -520,7 +520,7 @@ FILE_LOCAL int expcollect() fprintf( pCppOut, "parm[%d] = \"%s\"\n", nargs, parlist[nargs - 1]); #endif } /* Collect all args. */ - return (TRUE); /* Normal return */ + return TRUE; /* Normal return */ } /* diff --git a/rsc/source/rscpp/cpp5.c b/rsc/source/rscpp/cpp5.c index a6b9e142639c..765f7300ae5a 100644 --- a/rsc/source/rscpp/cpp5.c +++ b/rsc/source/rscpp/cpp5.c @@ -227,7 +227,7 @@ again: else if (op == OP_ADD && binop == 0) op = OP_PLU; /* Unary plus */ else if (op == OP_FAIL) - return (1); /* Error in evallex */ + return 1; /* Error in evallex */ #ifdef DEBUG_EVAL fprintf( pCppOut, "op = %s, opdope = %03o, binop = %d, skip = %d\n", opname[op], opdope[op], binop, opp->skip); @@ -237,12 +237,12 @@ again: if (binop != 0) { cerror("misplaced constant in #if", NULLST); - return (1); + return 1; } else if (valp >= &value[NEXP-1]) { cerror("#if value stack overflow", NULLST); - return (1); + return 1; } else { @@ -258,13 +258,13 @@ again: else if (op > OP_END) { cerror("Illegal #if line", NULLST); - return (1); + return 1; } prec = opdope[op]; if (binop != (prec & 1)) { cerror("Operator %s in incorrect context", opname[op]); - return (1); + return 1; } binop = (prec & 2) >> 1; for (;;) @@ -288,7 +288,7 @@ again: { cerror("expression stack overflow at op \"%s\"", opname[op]); - return (1); + return 1; } opp->op = (char)op; opp->prec = (char)prec; @@ -328,14 +328,14 @@ again: { case OP_END: /* Stack end marker */ if (op == OP_EOE) - return (valp[-1]); /* Finished ok. */ + return valp[-1]; /* Finished ok. */ goto again; /* Read another op. */ case OP_LPA: /* ( on stack */ if (op != OP_RPA) /* Matches ) on input */ { cerror("unbalanced paren's, op is \"%s\"", opname[op]); - return (1); + return 1; } opp--; /* Unstack it */ /* goto again; -- Fall through */ @@ -349,7 +349,7 @@ again: { cerror("Misplaced '?' or ':', previous operator is %s", opname[(int)opp->op]); - return (1); + return 1; } /* * Evaluate op1. @@ -389,7 +389,7 @@ again: if ((c = macroid(c)) == EOF_CHAR || c == '\n') { unget(); - return (OP_EOE); /* End of expression */ + return OP_EOE; /* End of expression */ } } while ((t = type[c]) == LET && catenate()); @@ -402,7 +402,7 @@ again: else cierror("illegal character (%d decimal) in #if", c); } - return (OP_FAIL); + return OP_FAIL; } else if (t == QUO) /* ' or " */ { @@ -412,10 +412,10 @@ again: #ifdef DEBUG_EVAL fprintf( pCppOut, "evalchar returns %d.\n", evalue); #endif - return (DIG); /* Return a value */ + return DIG; /* Return a value */ } cerror("Can't use a string in an #if", NULLST); - return (OP_FAIL); + return OP_FAIL; } else if (t == LET) /* ID must be a macro */ { @@ -430,14 +430,14 @@ again: if (c1 != '(' || /* Need to balance */ skipws() == ')') /* Did we balance? */ { - return (DIG); /* Parsed ok */ + return DIG; /* Parsed ok */ } } cerror("Bad #if ... defined() syntax", NULLST); - return (OP_FAIL); + return OP_FAIL; } else if (streq(token, "sizeof")) /* New sizeof hackery */ - return (dosizeof()); /* Gets own routine */ + return dosizeof(); /* Gets own routine */ /* * The Draft ANSI C Standard says that an undefined symbol * in an #if has the value zero. We are a bit pickier, @@ -449,7 +449,7 @@ again: cwarn("undefined symbol \"%s\" in #if, 0 used", token); #endif evalue = 0; - return (DIG); + return DIG; } else if (t == DIG) /* Numbers are harder */ { @@ -468,7 +468,7 @@ again: { case '!': if (c1 == '=') - return (OP_NE); + return OP_NE; break; case '=': @@ -476,9 +476,9 @@ again: { unget(); cerror("= not allowed in #if", NULLST); - return (OP_FAIL); + return OP_FAIL; } - return (OP_EQ); + return OP_EQ; case '>': case '<': @@ -498,11 +498,11 @@ again: if (c1 == '\n') /* Multi-line if */ goto again; cerror("Unexpected \\ in #if", NULLST); - return (OP_FAIL); + return OP_FAIL; } unget(); } - return (t); + return t; } /* @@ -560,7 +560,7 @@ FILE_LOCAL int dosizeof() if (tp->name == NULLST) { cerror("#if sizeof, unknown type \"%s\"", token); - return (OP_FAIL); + return OP_FAIL; } typecode |= tp->type; /* Or in the type bit */ } @@ -580,7 +580,7 @@ FILE_LOCAL int dosizeof() if (!bittest(typecode & *testp)) { cerror("#if ... sizeof: illegal type combination", NULLST); - return (OP_FAIL); + return OP_FAIL; } } /* @@ -600,7 +600,7 @@ FILE_LOCAL int dosizeof() if ((typecode & ~T_PTR) == 0) { cerror("#if sizeof() error, no type specified", NULLST); - return (OP_FAIL); + return OP_FAIL; } /* * Exactly one bit (and possibly T_PTR) may be set. @@ -611,17 +611,17 @@ FILE_LOCAL int dosizeof() { evalue = ((typecode & T_PTR) != 0) ? sizp->psize : sizp->size; - return (DIG); + return DIG; } } /* We shouldn't fail */ cierror("#if ... sizeof: bug, unknown type code 0x%x", typecode); - return (OP_FAIL); + return OP_FAIL; } nogood: unget(); cerror("#if ... sizeof() syntax error", NULLST); - return (OP_FAIL); + return OP_FAIL; } /* @@ -679,7 +679,7 @@ FILE_LOCAL int evalnum(int c) if (c == 'u' || c == 'U') /* Unsigned nonsense */ cget(); unget(); - return (value); + return value; } /* @@ -779,7 +779,7 @@ FILE_LOCAL int evalchar(int skip) value += c; } instring = FALSE; - return (value); + return value; } /* @@ -920,7 +920,7 @@ FILE_LOCAL int * evaleval(int* valp, int op, int skip) v1 = 0; } *valp++ = v1; - return (valp); + return valp; } #ifdef DEBUG_EVAL diff --git a/rsc/source/rscpp/cpp6.c b/rsc/source/rscpp/cpp6.c index 9444b720c80b..b94c81fe2395 100755 --- a/rsc/source/rscpp/cpp6.c +++ b/rsc/source/rscpp/cpp6.c @@ -170,7 +170,7 @@ int skipws() do { /* Skip whitespace */ c = get(); } while (type[c] == SPA); - return (c); + return c; } /* @@ -213,7 +213,7 @@ int macroid(int c) expand(dp); c = get(); } - return (c); + return c; } /* @@ -231,7 +231,7 @@ int catenate() if (get() != TOK_SEP) /* Token concatenation */ { unget(); - return (FALSE); + return FALSE; } else { @@ -276,7 +276,7 @@ int catenate() */ free(token1); /* Free up memory */ ungetstring(work); /* Unget the new thing, */ - return (TRUE); + return TRUE; } } @@ -310,13 +310,13 @@ int scanstring(int delim, if (c == delim) { (*outfun)(c); - return (TRUE); + return TRUE; } else { cerror("Unterminated string", NULLST); unget(); - return (FALSE); + return FALSE; } } @@ -488,7 +488,7 @@ char* savestring(char* text) size_t size = strlen(text) + 1; result = getmem(size); strcpy(result, text); - return (result); + return result; } /* @@ -513,7 +513,7 @@ FILEINFO* getfile(size_t bufsize, char* name) infile->line = line; /* Save current line */ infile = file; /* New current file */ line = 1; /* Note first line */ - return (file); /* All done. */ + return file; /* All done. */ } /* @@ -525,7 +525,7 @@ char* getmem(size_t size) if ((result = malloc((unsigned) size)) == NULL) cfatal("Out of memory", NULLST); - return (result); + return result; } /* @@ -557,7 +557,7 @@ DEFBUF* lookid(int c) unget(); /* Rescan terminator */ *np = EOS; /* Terminate token */ if (isrecurse) /* Recursive definition */ - return (NULL); /* undefined just now */ + return NULL; /* undefined just now */ nhash += (np - token); /* Fix hash value */ dp = symtab[nhash & SBMASK]; /* Starting bucket */ while (dp != (DEFBUF*) NULL) /* Search symbol table */ @@ -621,7 +621,7 @@ DEFBUF* defendel(char* name, int delete) dp->nargs = 0; strcpy(dp->name, name); } - return (dp); + return dp; } #if OSL_DEBUG_LEVEL > 1 @@ -769,7 +769,7 @@ int get() popped = 0; get_from_file: if ((file = infile) == NULL) - return (EOF_CHAR); + return EOF_CHAR; newline: /* @@ -833,7 +833,7 @@ int get() free(file->progname); /* free it, too. */ free((char*) file); /* Free file space */ if (infile == NULL) /* If at end of file */ - return (EOF_CHAR); /* Return end of file */ + return EOF_CHAR; /* Return end of file */ line = infile->line; /* Reset line number */ goto get_from_file; /* Get from the top. */ } @@ -861,7 +861,7 @@ int get() if (c == '\n') /* Maintain current */ ++line; /* line counter */ if (instring) /* Strings just return */ - return (c); /* the character. */ + return c; /* the character. */ else if (c == '/') /* Comment? */ { instring = TRUE; /* So get() won't loop */ @@ -871,7 +871,7 @@ int get() { instring = FALSE; /* Nope, no comment */ unget(); /* Push the char. back */ - return ('/'); /* Return the slash */ + return '/'; /* Return the slash */ } if (keepcomments) /* If writing comments */ { @@ -894,7 +894,7 @@ int get() { case EOF_CHAR: cerror("EOF in comment", NULLST); - return (EOF_CHAR); + return EOF_CHAR; case '/': if ((c = get()) != '*') /* Don't let comments */ @@ -928,7 +928,7 @@ int get() */ if (*file->bptr == '\n' || type[*file->bptr & 0xFF] == SPA) goto newline; - return ((file->bptr[-1] = ' ')); + return (file->bptr[-1] = ' '); case '\n': /* we'll need a #line */ if (!keepcomments) @@ -946,11 +946,11 @@ int get() if (keepcomments && c != EOF_CHAR) cput(c); if( EOF_CHAR == c ) - return (EOF_CHAR); + return EOF_CHAR; else if( '\n' == c ) { instring = FALSE; /* End of comment, */ - return( c ); + return c; } } } @@ -965,7 +965,7 @@ int get() else /* Backslash anything */ { unget(); /* Get it later */ - return ('\\'); /* Return the backslash */ + return '\\'; /* Return the backslash */ } } else if (c == '\f' || c == VT) /* Form Feed, Vertical */ @@ -994,7 +994,7 @@ int get() return 0xef; } } - return (c); /* Just return the char */ + return c; /* Just return the char */ } /* @@ -1039,7 +1039,7 @@ int cget() c = get(); } while (c == TOK_SEP); - return (c); + return c; } /* diff --git a/rsc/source/tools/rscchar.cxx b/rsc/source/tools/rscchar.cxx index 526e695d6edc..38f0ec6db52f 100644 --- a/rsc/source/tools/rscchar.cxx +++ b/rsc/source/tools/rscchar.cxx @@ -95,7 +95,7 @@ char * RscChar::MakeUTF8( char * pStr, sal_uInt16 nTextEncoding ) { // value is too big, or more than 3 digits delete [] pOrgStr; - return( NULL ); + return NULL; } c = (char)nChar; pStr--; |