[Libreoffice-commits] .: 6 commits - basic/source cosv/source filter/Module_filter.mk shell/source solenv/bin soltools/mkdepend

Caolán McNamara caolan at kemper.freedesktop.org
Thu Mar 22 05:28:56 PDT 2012


 basic/source/uno/dlgcont.cxx                      |   11 +----------
 cosv/source/storage/file.cxx                      |    5 ++---
 filter/Module_filter.mk                           |    3 ---
 shell/source/unix/sysshell/recently_used_file.cxx |    3 ++-
 solenv/bin/linkoo                                 |    1 -
 soltools/mkdepend/pr.c                            |   10 ++++++----
 6 files changed, 11 insertions(+), 22 deletions(-)

New commits:
commit ed0ffbba06f754eea1d37452dbdc684e8a4b72ad
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 22 12:21:20 2012 +0000

    over-engineered thread-safe static OUString
    
    This is a ridiculous over-engineered thread-safe static string for
    something which is called so few times, and costs 1k of long-term
    memory as the OUString dtor needs to be put into a callback
    queue to get called at module unload time.
    
    Just return a new string every time, *rolls eyes*

diff --git a/basic/source/uno/dlgcont.cxx b/basic/source/uno/dlgcont.cxx
index 3843039..fa99fe1 100644
--- a/basic/source/uno/dlgcont.cxx
+++ b/basic/source/uno/dlgcont.cxx
@@ -567,16 +567,7 @@ Sequence< OUString > SfxDialogLibraryContainer::getSupportedServiceNames_static(
 
 OUString SfxDialogLibraryContainer::getImplementationName_static()
 {
-    static OUString aImplName;
-    static sal_Bool bNeedsInit = sal_True;
-
-    MutexGuard aGuard( Mutex::getGlobalMutex() );
-    if( bNeedsInit )
-    {
-        aImplName = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.sfx2.DialogLibraryContainer"));
-        bNeedsInit = sal_False;
-    }
-    return aImplName;
+    return OUString("com.sun.star.comp.sfx2.DialogLibraryContainer");
 }
 
 Reference< XInterface > SAL_CALL SfxDialogLibraryContainer::Create( const Reference< XComponentContext >& ) throw( Exception )
commit c8587d05bd50c710fdbfae475aa495a8d46e6094
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 22 09:20:22 2012 +0000

    confirmed that tests pass on windows

diff --git a/filter/Module_filter.mk b/filter/Module_filter.mk
index 4f9773d..24fe97c 100644
--- a/filter/Module_filter.mk
+++ b/filter/Module_filter.mk
@@ -75,13 +75,10 @@ $(eval $(call gb_Module_add_targets,filter,\
 ))
 endif
 
-ifneq ($(OS),WNT)
-# TODO, see if it links and runs under windows
 $(eval $(call gb_Module_add_check_targets,filter,\
     CppunitTest_filter_tga_test \
     CppunitTest_filter_tiff_test \
 ))
-endif
 
 # TODO
 #$(eval $(call gb_Module_add_subsequentcheck_targets,filter,\
commit 52a6e0a6fa86f80ee91d52abc779b6db667c367a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 22 09:04:18 2012 +0000

    testtool is gone these days

diff --git a/solenv/bin/linkoo b/solenv/bin/linkoo
index daef867..86ac247 100755
--- a/solenv/bin/linkoo
+++ b/solenv/bin/linkoo
@@ -414,7 +414,6 @@ if (!-f "$OOO_INSTALL/" . $brand_program_dir . "/ooenv") {
     open ($ooenv, ">$OOO_INSTALL/" . $brand_program_dir . "/ooenv") || die "Can't open $OOO_INSTALL/" . $brand_program_dir . "/ooenv: $!";
     print $ooenv "thisdir=$OOO_INSTALL/" . $brand_program_dir . "/\n";
     print $ooenv $env_script;
-    print $ooenv "# testtool\nexport SRC_ROOT=$OOO_BUILD\n";
     close ($ooenv);
 }
 
commit 1a4276c511240d51e1956d157655d219dc8254fc
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Mar 21 21:33:04 2012 +0000

    WaE: ignoring lockf return value

diff --git a/shell/source/unix/sysshell/recently_used_file.cxx b/shell/source/unix/sysshell/recently_used_file.cxx
index 0336a7f..cf27852 100644
--- a/shell/source/unix/sysshell/recently_used_file.cxx
+++ b/shell/source/unix/sysshell/recently_used_file.cxx
@@ -100,7 +100,8 @@ recently_used_file::recently_used_file() :
 //------------------------------------------------
 recently_used_file::~recently_used_file()
 {
-    lockf(fileno(file_), F_ULOCK, 0);
+    int ret = lockf(fileno(file_), F_ULOCK, 0);
+    SAL_WARN_IF(ret != 0, "shell", "cannot unlock recently unused file");
     fclose(file_);
 }
 
commit 7dd0898578f9825fe470d58ed2d0e5bc155b66c7
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Mar 21 21:13:17 2012 +0000

    WaE: ignoring return value of 'fwrite'

diff --git a/cosv/source/storage/file.cxx b/cosv/source/storage/file.cxx
index 16665d7..0618fae 100644
--- a/cosv/source/storage/file.cxx
+++ b/cosv/source/storage/file.cxx
@@ -104,9 +104,8 @@ File::do_write( const void *    i_pSrc,
 
     if ( eLastIO == io_write )
         ::fseek( pStream, 0, SEEK_CUR );
-    uintt ret = position();
-    ::fwrite( i_pSrc, 1, i_nNrofBytes, pStream );
-    ret = position() - ret;
+
+    uintt ret = ::fwrite( i_pSrc, 1, i_nNrofBytes, pStream );
 
     eLastIO = io_write;
     return ret;
commit d7eb0ef560fb6b549f0054140e3b42d0a991bffe
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Mar 21 20:50:07 2012 +0000

    WaE: ignoring return value of 'fwrite'

diff --git a/soltools/mkdepend/pr.c b/soltools/mkdepend/pr.c
index 082e312..f472f28 100644
--- a/soltools/mkdepend/pr.c
+++ b/soltools/mkdepend/pr.c
@@ -29,7 +29,7 @@ in this Software without prior written authorization from the X Consortium.
 
 #include "def.h"
 #include <string.h>
-void pr( struct inclist *ip, char *file,char *base);
+size_t pr( struct inclist *ip, char *file,char *base);
 
 extern struct   inclist inclist[ MAXFILES ],
             *inclistp;
@@ -94,10 +94,11 @@ void recursive_pr_include(head, file, base)
         recursive_pr_include(head->i_list[ i ], file, base);
 }
 
-void pr(ip, file, base)
+size_t pr(ip, file, base)
     register struct inclist  *ip;
     char    *file, *base;
 {
+    size_t ret;
     static char *lastfile;
     static int  current_len;
     register int    len, i;
@@ -116,18 +117,19 @@ void pr(ip, file, base)
         strcpy(buf+1, ip->i_file);
         current_len += len;
     }
-    fwrite(buf, len, 1, stdout);
+    ret = fwrite(buf, len, 1, stdout);
 
     /*
      * If verbose is set, then print out what this file includes.
      */
     if (! verbose || ip->i_list == NULL || ip->i_notified)
-        return;
+        return ret;
     ip->i_notified = TRUE;
     lastfile = NULL;
     printf("\n# %s includes:", ip->i_file);
     for (i=0; i<ip->i_listlen; i++)
         printf("\n#\t%s", ip->i_list[ i ]->i_incstring);
+    return ret;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list