diff options
author | nccuong <cao.cuong.ngo@gmail.com> | 2013-03-04 15:25:02 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-03-06 12:59:26 +0000 |
commit | a6b91730053fc61416716ae176081b91de52532b (patch) | |
tree | 192e578875f9abe82ca535e3cb794944bac9d9aa /idl/source/prj | |
parent | 6374ae0721a5e5da9ed1a477f9642feba01199a6 (diff) |
fdo#60148 Clean up warnings from the Clang compiler plugin
Change-Id: I08d755677c46c476710ecbd067ed9f7e2f54a671
loplugin: clean warnings: unused variables, incorrect indentation and log area.
Reviewed-on: https://gerrit.libreoffice.org/2544
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'idl/source/prj')
-rw-r--r-- | idl/source/prj/command.cxx | 202 |
1 files changed, 102 insertions, 100 deletions
diff --git a/idl/source/prj/command.cxx b/idl/source/prj/command.cxx index a8b5ef1ea25c..a61804f8cd5e 100644 --- a/idl/source/prj/command.cxx +++ b/idl/source/prj/command.cxx @@ -216,80 +216,124 @@ SvCommand::SvCommand( int argc, char ** argv ) StringList aList; if( ResponseFile( &aList, argc, argv ) ) - for( size_t i = 1; i < aList.size(); i++ ) { - String aParam( *aList[ i ] ); - sal_Unicode aFirstChar( aParam.GetChar(0) ); - if( '-' == aFirstChar ) + for( size_t i = 1; i < aList.size(); i++ ) { - aParam.Erase( 0, 1 ); - aFirstChar = aParam.GetChar(0); - if( aFirstChar == 'F' || aFirstChar == 'f' ) + String aParam( *aList[ i ] ); + sal_Unicode aFirstChar( aParam.GetChar(0) ); + if( '-' == aFirstChar ) { aParam.Erase( 0, 1 ); aFirstChar = aParam.GetChar(0); - String aName( aParam.Copy( 1 ) ); - if( 's' == aFirstChar ) - { // name of slot output - aSlotMapFile = aName; - } - else if( 'l' == aFirstChar ) - { // name of listing - aListFile = aName; - } - else if( 'i' == aFirstChar ) - { - } - else if( 'o' == aFirstChar ) - { - } - else if( 'd' == aFirstChar ) - { // name of data set file - aDataBaseFile = aName; - } - else if( 'D' == aFirstChar ) - { - } - else if( 'C' == aFirstChar ) - { - } - else if( 'H' == aFirstChar ) - { - } - else if( 'c' == aFirstChar ) + if( aFirstChar == 'F' || aFirstChar == 'f' ) { + aParam.Erase( 0, 1 ); + aFirstChar = aParam.GetChar(0); + String aName( aParam.Copy( 1 ) ); + if( 's' == aFirstChar ) + { // name of slot output + aSlotMapFile = aName; + } + else if( 'l' == aFirstChar ) + { // name of listing + aListFile = aName; + } + else if( 'i' == aFirstChar ) + { + } + else if( 'o' == aFirstChar ) + { + } + else if( 'd' == aFirstChar ) + { // name of data set file + aDataBaseFile = aName; + } + else if( 'D' == aFirstChar ) + { + } + else if( 'C' == aFirstChar ) + { + } + else if( 'H' == aFirstChar ) + { + } + else if( 'c' == aFirstChar ) + { + } + else if( 'h' == aFirstChar ) + { + } + else if( 't' == aFirstChar ) + { + } + else if( 'm' == aFirstChar ) + { // name of info file + aTargetFile = aName; + } + else if( 'r' == aFirstChar ) + { + } + else if( 'z' == aFirstChar ) + { // name of HelpId file + aHelpIdFile = aName; + } + else if( 'y' == aFirstChar ) + { // name of CSV file + aCSVFile = aName; + } + else if( 'x' == aFirstChar ) + { // name of IDL file for the CSV file + aExportFile = aName; + } + else if( 'M' == aFirstChar ) + { + m_DepFile = aName; + } + else + { + printf( + "unknown switch: %s\n", + rtl::OUStringToOString( + aParam, RTL_TEXTENCODING_UTF8).getStr()); + exit( -1 ); + } } - else if( 'h' == aFirstChar ) - { + else if( aParam.EqualsIgnoreCaseAscii( "help" ) || aParam.EqualsIgnoreCaseAscii( "?" ) ) + { // help + printf( "%s", CommandLineSyntax ); } - else if( 't' == aFirstChar ) + else if( aParam.EqualsIgnoreCaseAscii( "quiet" ) ) { + nVerbosity = 0; } - else if( 'm' == aFirstChar ) - { // name of info file - aTargetFile = aName; - } - else if( 'r' == aFirstChar ) + else if( aParam.EqualsIgnoreCaseAscii( "verbose" ) ) { + nVerbosity = 2; } - else if( 'z' == aFirstChar ) - { // name of HelpId file - aHelpIdFile = aName; + else if( aParam.EqualsIgnoreCaseAscii( "syntax" ) ) + { // help + int j = 0; + while(SyntaxStrings[j]) + printf("%s\n",SyntaxStrings[j++]); } - else if( 'y' == aFirstChar ) - { // name of CSV file - aCSVFile = aName; + else if( aParam.EqualsIgnoreCaseAscii( "i", 0, 1 ) ) + { // define include paths + String aName( aParam.Copy( 1 ) ); + if( aPath.Len() ) + aPath += DirEntry::GetSearchDelimiter(); + aPath += aName; } - else if( 'x' == aFirstChar ) - { // name of IDL file for the CSV file - aExportFile = aName; - } - else if( 'M' == aFirstChar ) - { - m_DepFile = aName; + else if( aParam.EqualsIgnoreCaseAscii( "rsc", 0, 3 ) ) + { // first line in *.srs file + OSL_ENSURE(false, "does anything use this option, doesn't look like it belong here"); + if( aList[ i + 1 ] ) + { + i++; + } } else { + // temporary compatibility hack printf( "unknown switch: %s\n", rtl::OUStringToOString( @@ -297,53 +341,11 @@ SvCommand::SvCommand( int argc, char ** argv ) exit( -1 ); } } - else if( aParam.EqualsIgnoreCaseAscii( "help" ) || aParam.EqualsIgnoreCaseAscii( "?" ) ) - { // help - printf( "%s", CommandLineSyntax ); - } - else if( aParam.EqualsIgnoreCaseAscii( "quiet" ) ) - { - nVerbosity = 0; - } - else if( aParam.EqualsIgnoreCaseAscii( "verbose" ) ) - { - nVerbosity = 2; - } - else if( aParam.EqualsIgnoreCaseAscii( "syntax" ) ) - { // help - int j = 0; - while(SyntaxStrings[j]) - printf("%s\n",SyntaxStrings[j++]); - } - else if( aParam.EqualsIgnoreCaseAscii( "i", 0, 1 ) ) - { // define include paths - String aName( aParam.Copy( 1 ) ); - if( aPath.Len() ) - aPath += DirEntry::GetSearchDelimiter(); - aPath += aName; - } - else if( aParam.EqualsIgnoreCaseAscii( "rsc", 0, 3 ) ) - { // first line in *.srs file - OSL_ENSURE(false, "does anything use this option, doesn't look like it belong here"); - if( aList[ i + 1 ] ) - { - i++; - } - } else { - // temporary compatibility hack - printf( - "unknown switch: %s\n", - rtl::OUStringToOString( - aParam, RTL_TEXTENCODING_UTF8).getStr()); - exit( -1 ); + aInFileList.push_back( new String( aParam ) ); } } - else - { - aInFileList.push_back( new String( aParam ) ); - } } else { |