-Werror,-Wunused-but-set-variable (Clang 13 trunk)
> unodevtools/source/skeletonmaker/skeletoncommon.cxx(47,13): error: variable 'shortfilename' set but not used [-Werror,-Wunused-but-set-variable] > OString shortfilename(filename); > ^ Change-Id: I18510a5c2d2ceca4eab3ef93c0a32a1bffafac6e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116661 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
@@ -980,7 +980,7 @@ void generateSkeleton(ProgramOptions const & options,
|
||||
|
||||
try {
|
||||
if (!standardout && options.license) {
|
||||
printLicenseHeader(*pofs, compFileName);
|
||||
printLicenseHeader(*pofs);
|
||||
}
|
||||
|
||||
generateIncludes(*pofs, interfaces, propertyhelper, serviceobject,
|
||||
@@ -1138,7 +1138,7 @@ void generateCalcAddin(ProgramOptions const & options,
|
||||
|
||||
try {
|
||||
if (!standardout && options.license) {
|
||||
printLicenseHeader(*pofs, compFileName);
|
||||
printLicenseHeader(*pofs);
|
||||
}
|
||||
|
||||
generateIncludes(*pofs, interfaces, propertyhelper, serviceobject,
|
||||
|
@@ -874,7 +874,7 @@ void generateSkeleton(ProgramOptions const & options,
|
||||
|
||||
try {
|
||||
if (!standardout && options.license) {
|
||||
printLicenseHeader(*pofs, compFileName);
|
||||
printLicenseHeader(*pofs);
|
||||
}
|
||||
|
||||
generatePackage(*pofs, options.implname);
|
||||
|
@@ -36,18 +36,8 @@ using namespace ::codemaker::cpp;
|
||||
|
||||
namespace skeletonmaker {
|
||||
|
||||
void printLicenseHeader(std::ostream& o, OString const & filename)
|
||||
void printLicenseHeader(std::ostream& o)
|
||||
{
|
||||
sal_Int32 index;
|
||||
#ifdef SAL_UNX
|
||||
index = filename.lastIndexOf('/');
|
||||
#else
|
||||
index = filename.lastIndexOf('\\');
|
||||
#endif
|
||||
OString shortfilename(filename);
|
||||
if ( index != -1 )
|
||||
shortfilename = filename.copy(index+1);
|
||||
|
||||
o << "/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */\n"
|
||||
"/*\n"
|
||||
" * This file is part of the LibreOffice project.\n"
|
||||
|
@@ -69,7 +69,7 @@ struct ProgramOptions {
|
||||
@param o specifies the output stream
|
||||
@param filename specifies the source file name
|
||||
*/
|
||||
void printLicenseHeader(std::ostream& o, OString const & filename);
|
||||
void printLicenseHeader(std::ostream& o);
|
||||
|
||||
/**
|
||||
create dependent on the output path, the implementation name and the
|
||||
|
Reference in New Issue
Block a user