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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Feb 15 17:20:18 UTC 2019


 onlineupdate/source/update/updater/updater.cxx |   15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

New commits:
commit eaabda554c7ac5ec814f7eefdb1a57719e590e92
Author:     Markus Mohrhard <markus.mohrhard at googlemail.com>
AuthorDate: Fri Feb 15 16:37:58 2019 +0100
Commit:     Markus Mohrhard <markus.mohrhard at googlemail.com>
CommitDate: Fri Feb 15 18:19:53 2019 +0100

    work around Werror=format-truncation in onlineupdate for now
    
    Change-Id: I6230cc8c76313b5d180ef3fbebec4bc20b794150
    Reviewed-on: https://gerrit.libreoffice.org/67879
    Tested-by: Jenkins
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/onlineupdate/source/update/updater/updater.cxx b/onlineupdate/source/update/updater/updater.cxx
index 3cd4aa890aa0..1166501f575e 100644
--- a/onlineupdate/source/update/updater/updater.cxx
+++ b/onlineupdate/source/update/updater/updater.cxx
@@ -1604,8 +1604,9 @@ PatchFile::Prepare()
     // extract the patch to a temporary file
     mPatchIndex = sPatchIndex++;
 
-    NS_tsnprintf(spath, sizeof(spath)/sizeof(spath[0]),
+    int nWrittenBytes = NS_tsnprintf(spath, sizeof(spath)/sizeof(spath[0]),
                  NS_T("%s/updating/%d.patch"), gWorkingDirPath, mPatchIndex);
+    (void) nWrittenBytes;
 
     NS_tremove(spath);
 
@@ -2491,8 +2492,9 @@ ProcessReplaceRequest()
     // need to have the last-update.log and backup-update.log files moved from the
     // old installation directory to the new installation directory.
     NS_tchar tmpLog[MAXPATHLEN];
-    NS_tsnprintf(tmpLog, sizeof(tmpLog)/sizeof(tmpLog[0]),
+    int nWrittenBytes = NS_tsnprintf(tmpLog, sizeof(tmpLog)/sizeof(tmpLog[0]),
                  NS_T("%s/updates/last-update.log"), tmpDir);
+    (void) nWrittenBytes;
     if (!NS_taccess(tmpLog, F_OK))
     {
         NS_tchar destLog[MAXPATHLEN];
@@ -2672,7 +2674,7 @@ CheckSignature(ArchiveReader& archiveReader)
 
             // TODO: moggi: needs adaption for LibreOffice
             // These paths need to be adapted for us.
-            NS_tsnprintf(updateSettingsPath,
+            int nWrittenBytes = NS_tsnprintf(updateSettingsPath,
                          sizeof(updateSettingsPath) / sizeof(updateSettingsPath[0]),
 #ifdef MACOSX
                          NS_T("%s/Contents/Resources/update-settings.ini"),
@@ -2680,6 +2682,7 @@ CheckSignature(ArchiveReader& archiveReader)
                          NS_T("%s/update-settings.ini"),
 #endif
                          gWorkingDirPath);
+            (void) nWrittenBytes;
             MARChannelStringTable MARStrings;
             if (ReadMARChannelIDs(updateSettingsPath, &MARStrings) != OK)
             {
@@ -2743,8 +2746,9 @@ UpdateThreadFunc(void * /*param*/)
                 rv = DoUpdate(archiveReader);
             }
             NS_tchar updatingDir[MAXPATHLEN];
-            NS_tsnprintf(updatingDir, sizeof(updatingDir)/sizeof(updatingDir[0]),
+            int nWrittenBytes = NS_tsnprintf(updatingDir, sizeof(updatingDir)/sizeof(updatingDir[0]),
                          NS_T("%s/updating"), gWorkingDirPath);
+            (void) nWrittenBytes;
             ensure_remove_recursive(updatingDir);
         }
     }
@@ -4452,8 +4456,9 @@ int AddPreCompleteActions(ActionList *list)
 int DoUpdate(ArchiveReader& archiveReader)
 {
     NS_tchar manifest[MAXPATHLEN];
-    NS_tsnprintf(manifest, sizeof(manifest)/sizeof(manifest[0]),
+    int nWrittenBytes = NS_tsnprintf(manifest, sizeof(manifest)/sizeof(manifest[0]),
                  NS_T("%s/updating/update.manifest"), gWorkingDirPath);
+    (void) nWrittenBytes;
     ensure_parent_dir(manifest);
 
     // extract the manifest


More information about the Libreoffice-commits mailing list