[Libreoffice-commits] core.git: unodevtools/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Thu Jun 3 13:17:07 UTC 2021


 unodevtools/source/skeletonmaker/cppcompskeleton.cxx  |    4 ++--
 unodevtools/source/skeletonmaker/javacompskeleton.cxx |    2 +-
 unodevtools/source/skeletonmaker/skeletoncommon.cxx   |   12 +-----------
 unodevtools/source/skeletonmaker/skeletoncommon.hxx   |    2 +-
 4 files changed, 5 insertions(+), 15 deletions(-)

New commits:
commit a19062084bcc71ff1690f799a2379fe60bdb8c37
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Jun 3 13:57:45 2021 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Jun 3 15:16:27 2021 +0200

    -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 at redhat.com>

diff --git a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
index a2460ff28dd1..c7dbbf73451d 100644
--- a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
+++ b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
@@ -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,
diff --git a/unodevtools/source/skeletonmaker/javacompskeleton.cxx b/unodevtools/source/skeletonmaker/javacompskeleton.cxx
index 7f8ca012d3b7..c6576c40bfc8 100644
--- a/unodevtools/source/skeletonmaker/javacompskeleton.cxx
+++ b/unodevtools/source/skeletonmaker/javacompskeleton.cxx
@@ -874,7 +874,7 @@ void generateSkeleton(ProgramOptions const & options,
 
     try {
         if (!standardout && options.license) {
-            printLicenseHeader(*pofs, compFileName);
+            printLicenseHeader(*pofs);
         }
 
         generatePackage(*pofs, options.implname);
diff --git a/unodevtools/source/skeletonmaker/skeletoncommon.cxx b/unodevtools/source/skeletonmaker/skeletoncommon.cxx
index e2ecdb35a824..cc68d744066f 100644
--- a/unodevtools/source/skeletonmaker/skeletoncommon.cxx
+++ b/unodevtools/source/skeletonmaker/skeletoncommon.cxx
@@ -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"
diff --git a/unodevtools/source/skeletonmaker/skeletoncommon.hxx b/unodevtools/source/skeletonmaker/skeletoncommon.hxx
index b6e6d0d74c19..b0bf3e5d01c7 100644
--- a/unodevtools/source/skeletonmaker/skeletoncommon.hxx
+++ b/unodevtools/source/skeletonmaker/skeletoncommon.hxx
@@ -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


More information about the Libreoffice-commits mailing list