[Libreoffice-commits] .: 4 commits - sd/CppunitTest_sd_uimpress.mk sd/Library_sd.mk sd/source

Michael Stahl mst at kemper.freedesktop.org
Mon Aug 6 06:06:46 PDT 2012


 sd/CppunitTest_sd_uimpress.mk                   |    6 ++++++
 sd/Library_sd.mk                                |    6 ++++++
 sd/source/ui/remotecontrol/DiscoveryService.cxx |    8 +++++---
 sd/source/ui/remotecontrol/Receiver.cxx         |    2 +-
 sd/source/ui/remotecontrol/Server.cxx           |    2 +-
 5 files changed, 19 insertions(+), 5 deletions(-)

New commits:
commit 0e80e5fe412a19ca04b577d0cf93625b745f0dbc
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Aug 6 15:03:50 2012 +0200

    sd: link against ws2_32 on WNT for socket API
    
    Change-Id: I44db5170cd4d7c3074af42b59e6dc1f9f783a974

diff --git a/sd/CppunitTest_sd_uimpress.mk b/sd/CppunitTest_sd_uimpress.mk
index 94065b0..ee9046f 100644
--- a/sd/CppunitTest_sd_uimpress.mk
+++ b/sd/CppunitTest_sd_uimpress.mk
@@ -74,6 +74,12 @@ $(eval $(call gb_CppunitTest_use_libraries,sd_uimpress,\
     $(gb_STDLIBS) \
 ))
 
+ifeq ($(OS),WNT)
+$(eval $(call gb_CppunitTest_use_libraries,sd_uimpress,\
+	ws2_32 \
+))
+endif
+
 $(eval $(call gb_CppunitTest_add_exception_objects,sd_uimpress,\
     sd/qa/unit/uimpress \
 ))
diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk
index ca00b19..1fb99e0 100644
--- a/sd/Library_sd.mk
+++ b/sd/Library_sd.mk
@@ -109,6 +109,12 @@ $(eval $(call gb_Library_use_libraries,sd,\
     $(gb_STDLIBS) \
 ))
 
+ifeq ($(OS),WNT)
+$(eval $(call gb_Library_use_libraries,sd,\
+	ws2_32 \
+))
+endif
+
 $(eval $(call gb_Library_set_componentfile,sd,sd/util/sd))
 
 $(eval $(call gb_Library_add_exception_objects,sd,\
commit e3b57c4de31c2180efa30dc8d86c533dd176686e
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Aug 6 15:00:18 2012 +0200

    warning C4700: uninitialized local variable 'aRet' used
    
    Change-Id: Ifb6a397372255b6e63e93a2f1f079e6d78531280

diff --git a/sd/source/ui/remotecontrol/DiscoveryService.cxx b/sd/source/ui/remotecontrol/DiscoveryService.cxx
index fddaf3a..50f7d77 100644
--- a/sd/source/ui/remotecontrol/DiscoveryService.cxx
+++ b/sd/source/ui/remotecontrol/DiscoveryService.cxx
@@ -73,9 +73,9 @@ void DiscoveryService::replyTo( sockaddr_in& rAddr )
 void DiscoveryService::execute()
 {
     fprintf( stderr, "Discovery service is listening\n" );;
-    sal_uInt64 aRet, aRead;
+    sal_uInt64 aRet(0);
+    sal_uInt64 aRead(0);
     vector<char> aBuffer;
-    aRead = 0;
 
     while ( true )
     {
commit 4a6ced8f94afba28e7e3a00573db2440b876d7d9
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Aug 6 14:59:08 2012 +0200

    warning C4101: unreferenced local variable
    
    Change-Id: I0eac170f7fafebb438b1516fa271cc4971a9704d

diff --git a/sd/source/ui/remotecontrol/Receiver.cxx b/sd/source/ui/remotecontrol/Receiver.cxx
index d7c97bb..8cdedb7 100644
--- a/sd/source/ui/remotecontrol/Receiver.cxx
+++ b/sd/source/ui/remotecontrol/Receiver.cxx
@@ -55,7 +55,7 @@ void Receiver::parseCommand( std::vector<OString> aCommand )
         xSlideShowController =  uno::Reference<presentation::XSlideShowController>(
            xPresentation->getController(), uno::UNO_QUERY_THROW );
     }
-    catch ( com::sun::star::uno::RuntimeException &e )
+    catch (uno::RuntimeException &)
     {
         fprintf( stderr, "Error in retrieving Controller\n" );
         //return;
diff --git a/sd/source/ui/remotecontrol/Server.cxx b/sd/source/ui/remotecontrol/Server.cxx
index 8371728..1550b57 100644
--- a/sd/source/ui/remotecontrol/Server.cxx
+++ b/sd/source/ui/remotecontrol/Server.cxx
@@ -54,7 +54,7 @@ void RemoteServer::listenThread()
             presentationStarted( xPresentation->getController() );
         }
     }
-    catch ( com::sun::star::uno::RuntimeException &e )
+    catch (uno::RuntimeException &)
     {
     }
 
commit 7040497038ce7dc3723887a28a4007cc9b5c942d
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Aug 6 14:16:04 2012 +0200

    sd: remotecontrol: fix setsockopt call for WNT:
    
    Apparently on Linux the 4th parameter to setsockopt has type void* while
    on Windows it is const char*; add a cast in the hope that it will work.
    
    Change-Id: I5506788a7fa12b03d9cec2756c84487db772fb0d

diff --git a/sd/source/ui/remotecontrol/DiscoveryService.cxx b/sd/source/ui/remotecontrol/DiscoveryService.cxx
index f482158..fddaf3a 100644
--- a/sd/source/ui/remotecontrol/DiscoveryService.cxx
+++ b/sd/source/ui/remotecontrol/DiscoveryService.cxx
@@ -50,6 +50,9 @@ DiscoveryService::DiscoveryService()
     multicastRequest.imr_interface.s_addr = htonl(INADDR_ANY);
 
     setsockopt( mSocket, IPPROTO_IP, IP_ADD_MEMBERSHIP,
+#ifdef WNT
+        (const char*)
+#endif
         &multicastRequest, sizeof(multicastRequest));
 }
 
@@ -116,4 +119,4 @@ void DiscoveryService::setup()
   spService->launch();
 }
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list