[Libreoffice-commits] core.git: Branch 'feature/mar-updater' - 2 commits - onlineupdate/source

2017-05-05 Thread Markus Mohrhard
 onlineupdate/source/mbsdiff/bsdiff.cxx   |6 +++---
 onlineupdate/source/update/updater/archivereader.cxx |2 ++
 2 files changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 189ada7e347bf6b2b886ab3122aaf5aa26e9467d
Author: Markus Mohrhard 
Date:   Fri May 5 14:05:28 2017 +0200

Wsometimes-uninitialized

Change-Id: Ia160685694a386358506f94c4cc1510e5e2a6f62

diff --git a/onlineupdate/source/mbsdiff/bsdiff.cxx 
b/onlineupdate/source/mbsdiff/bsdiff.cxx
index ef80bd99770f..d455bf98046d 100644
--- a/onlineupdate/source/mbsdiff/bsdiff.cxx
+++ b/onlineupdate/source/mbsdiff/bsdiff.cxx
@@ -212,9 +212,9 @@ search(int32_t *I,unsigned char *old,int32_t oldsize,
 int main(int argc,char *argv[])
 {
 int fd;
-unsigned char *old,*newbuf;
-int32_t oldsize,newsize;
-int32_t *I,*V;
+unsigned char *old = nullptr,*newbuf = nullptr;
+int32_t oldsize = 0,newsize = 0;
+int32_t *I = nullptr,*V = nullptr;
 
 int32_t scan,pos,len;
 int32_t lastscan,lastpos,lastoffset;
commit 234ad04a603c5968c057c5857a854058b2188c75
Author: Markus Mohrhard 
Date:   Fri May 5 14:03:07 2017 +0200

Wunused-macros

Change-Id: Ib50bd405101acb908831d943d449c3cf86b2ac85

diff --git a/onlineupdate/source/update/updater/archivereader.cxx 
b/onlineupdate/source/update/updater/archivereader.cxx
index ec043680c27e..bb548b919a0b 100644
--- a/onlineupdate/source/update/updater/archivereader.cxx
+++ b/onlineupdate/source/update/updater/archivereader.cxx
@@ -25,7 +25,9 @@
 #endif
 #endif
 
+#if defined(_WIN32)
 #define UPDATER_NO_STRING_GLUE_STL
+#endif
 #include "nsVersionComparator.h"
 #undef UPDATER_NO_STRING_GLUE_STL
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/mar-updater' - 2 commits - onlineupdate/source

2017-05-03 Thread Markus Mohrhard
 onlineupdate/source/service/serviceinstall.cxx |1 
 onlineupdate/source/update/updater/updater.cxx |   34 -
 2 files changed, 1 insertion(+), 34 deletions(-)

New commits:
commit e5e907e0492dfdc19b92fd8c3d8106824ab0c252
Author: Markus Mohrhard 
Date:   Wed May 3 22:51:57 2017 +0200

add TODO

Change-Id: I2d913a878aba91fea41a010237dd685845b5b648

diff --git a/onlineupdate/source/service/serviceinstall.cxx 
b/onlineupdate/source/service/serviceinstall.cxx
index a225e9445544..0bbc875086be 100644
--- a/onlineupdate/source/service/serviceinstall.cxx
+++ b/onlineupdate/source/service/serviceinstall.cxx
@@ -75,6 +75,7 @@ ReadMaintenanceServiceStrings(LPCWSTR path,
 {
 // Read in the maintenance service description string if specified.
 const unsigned int kNumStrings = 1;
+// TODO: moggi: needs adaption for LibreOffice
 const char *kServiceKeys = "MozillaMaintenanceDescription\0";
 char serviceStrings[kNumStrings][MAX_TEXT_LEN];
 int result = ReadStrings(path, kServiceKeys,
commit 02c36ab9c67ce571ad06263f1bd021e89a76b1aa
Author: Markus Mohrhard 
Date:   Wed May 3 22:50:54 2017 +0200

remove unused hard link support

Change-Id: I7f40598df74c8731b13c37b8adaa636086d204b4

diff --git a/onlineupdate/source/update/updater/updater.cxx 
b/onlineupdate/source/update/updater/updater.cxx
index 3c5baca1e3ac..1e36b4d300f8 100644
--- a/onlineupdate/source/update/updater/updater.cxx
+++ b/onlineupdate/source/update/updater/updater.cxx
@@ -112,8 +112,6 @@ struct UpdateServerThreadArgs
 #define USE_EXECV
 #endif
 
-# define MAYBE_USE_HARD_LINKS 0
-
 #if defined(VERIFY_MAR_SIGNATURE) && !defined(_WIN32) && !defined(MACOSX)
 #include 
 #include 
@@ -639,26 +637,6 @@ static int ensure_copy_symlink(const NS_tchar *path, const 
NS_tchar *dest)
 }
 #endif
 
-#if MAYBE_USE_HARD_LINKS
-/*
- * Creates a hardlink (destFilename) which points to the existing file
- * (srcFilename).
- *
- * @return 0 if successful, an error otherwise
- */
-
-static int
-create_hard_link(const NS_tchar *srcFilename, const NS_tchar *destFilename)
-{
-if (link(srcFilename, destFilename) < 0)
-{
-LOG(("link(%s, %s) failed errno = %d", srcFilename, destFilename, 
errno));
-return WRITE_ERROR;
-}
-return OK;
-}
-#endif
-
 // Copy the file named path onto a new file named dest.
 static int ensure_copy(const NS_tchar *path, const NS_tchar *dest)
 {
@@ -689,18 +667,6 @@ static int ensure_copy(const NS_tchar *path, const 
NS_tchar *dest)
 }
 #endif
 
-#if MAYBE_USE_HARD_LINKS
-if (sUseHardLinks)
-{
-if (!create_hard_link(path, dest))
-{
-return OK;
-}
-// Since we failed to create the hard link, fall through and copy the 
file.
-sUseHardLinks = false;
-}
-#endif
-
 AutoFile infile(ensure_open(path, NS_T("rb"), ss.st_mode));
 if (!infile)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits