diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2006-06-19 13:28:58 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2006-06-19 13:28:58 +0000 |
commit | c453fd5980dc2246f402da0cfae07240bfa56b7b (patch) | |
tree | 98cef07bd87f4a7a76f10e8f852a6d3046cf1378 /registry/tools | |
parent | d67d41f10f8255a25e356aca61be98047ae5a004 (diff) |
INTEGRATION: CWS warnings01 (1.6.106); FILE MERGED
2005/09/22 22:06:12 sb 1.6.106.3: RESYNC: (1.6-1.7); FILE MERGED
2005/09/05 10:06:52 sb 1.6.106.2: #i53898# Made code warning-free.
2005/08/29 14:09:44 sb 1.6.106.1: #i53898# Made code warning-free.
Diffstat (limited to 'registry/tools')
-rw-r--r-- | registry/tools/checksingleton.cxx | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/registry/tools/checksingleton.cxx b/registry/tools/checksingleton.cxx index dbede9a6c..486861c29 100644 --- a/registry/tools/checksingleton.cxx +++ b/registry/tools/checksingleton.cxx @@ -4,9 +4,9 @@ * * $RCSfile: checksingleton.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: rt $ $Date: 2005-09-09 05:18:21 $ + * last change: $Author: hr $ $Date: 2006-06-19 14:28:58 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -92,11 +92,22 @@ OUString convertToFileUrl(const OString& fileName) if ( fileName.indexOf('.') == 0 || fileName.indexOf(SEPARATOR) < 0 ) { OUString uWorkingDir; - OSL_VERIFY( osl_getProcessWorkingDir(&uWorkingDir.pData) == osl_Process_E_None ); - OSL_VERIFY( FileBase::getAbsoluteFileURL(uWorkingDir, uFileName, uUrlFileName) == FileBase::E_None ); + if (osl_getProcessWorkingDir(&uWorkingDir.pData) != osl_Process_E_None) + { + OSL_ASSERT(false); + } + if (FileBase::getAbsoluteFileURL(uWorkingDir, uFileName, uUrlFileName) + != FileBase::E_None) + { + OSL_ASSERT(false); + } } else { - OSL_VERIFY( FileBase::getFileURLFromSystemPath(uFileName, uUrlFileName) == FileBase::E_None ); + if (FileBase::getFileURLFromSystemPath(uFileName, uUrlFileName) + != FileBase::E_None) + { + OSL_ASSERT(false); + } } return uUrlFileName; @@ -175,7 +186,7 @@ sal_Bool Options::initOptions(int ac, char* av[], sal_Bool bCmdFile) } char *s=NULL; - for (i; i < ac; i++) + for (; i < ac; i++) { if (av[i][0] == '-') { @@ -291,9 +302,9 @@ sal_Bool Options::initOptions(int ac, char* av[], sal_Bool bCmdFile) bRet = initOptions(rargc, rargv, bCmdFile); - for (long i=0; i < rargc; i++) + for (long j=0; j < rargc; j++) { - free(rargv[i]); + free(rargv[j]); } } } else @@ -368,10 +379,10 @@ static sal_Bool checkSingletons(RegistryKey& singletonKey, RegistryKey& typeKey) } else { bRet = sal_True; - OUString value = reader.getSuperTypeName(); + OUString value2 = reader.getSuperTypeName(); if ( entryKey.setValue(tmpName, RG_VALUETYPE_UNICODE, - (RegValue)value.getStr(), sizeof(sal_Unicode)* (value.getLength()+1)) ) + (RegValue)value2.getStr(), sizeof(sal_Unicode)* (value2.getLength()+1)) ) { fprintf(stderr, "%s: could not create data entry for singleton \"%s\"\n", options.getProgramName().getStr(), U2S( singletonName )); @@ -380,7 +391,7 @@ static sal_Bool checkSingletons(RegistryKey& singletonKey, RegistryKey& typeKey) if ( options.forceOutput() ) { fprintf(stderr, "%s: create SINGLETON entry for \"%s\" -> \"%s\"\n", - options.getProgramName().getStr(), U2S( singletonName ), U2S(value)); + options.getProgramName().getStr(), U2S( singletonName ), U2S(value2)); } } } @@ -408,8 +419,7 @@ static sal_Bool checkSingletons(RegistryKey& singletonKey, RegistryKey& typeKey) #if (defined UNX) || (defined OS2) int main( int argc, char * argv[] ) #else - -void _cdecl main( int argc, char * argv[] ) +int _cdecl main( int argc, char * argv[] ) #endif { if ( !options.initOptions(argc, argv) ) @@ -502,8 +512,6 @@ void _cdecl main( int argc, char * argv[] ) options.getProgramName().getStr(), options.getTypeReg().getStr()); exit(11); } - - exit(0); } |