[Libreoffice-commits] core.git: 3 commits - sc/source sd/source

Tor Lillqvist tlillqvist at suse.com
Fri Aug 16 15:53:35 PDT 2013


 sc/source/ui/view/editsh.cxx                                |   12 +++++++++++-
 sd/source/ui/remotecontrol/WINNetworkService.cxx            |    7 ++-----
 sd/source/ui/remotecontrol/mDNSResponder/dnssd_clientstub.c |   11 ++++++++---
 3 files changed, 21 insertions(+), 9 deletions(-)

New commits:
commit 4a01706377c6e1e7528f0536e4edf60d4cff5504
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Fri Aug 16 23:46:27 2013 +0300

    WaE: C4204: nonstandard extension used : non-constant aggregate initializer
    
    Change-Id: I5f34209ad4ea5b97e12cb7073fcf1cf2264ebcf3

diff --git a/sd/source/ui/remotecontrol/mDNSResponder/dnssd_clientstub.c b/sd/source/ui/remotecontrol/mDNSResponder/dnssd_clientstub.c
index fb4ae95..5dcc196 100755
--- a/sd/source/ui/remotecontrol/mDNSResponder/dnssd_clientstub.c
+++ b/sd/source/ui/remotecontrol/mDNSResponder/dnssd_clientstub.c
@@ -1492,7 +1492,9 @@ DNSServiceErrorType DNSSD_API DNSServiceRegister
     size_t len;
     ipc_msg_hdr *hdr;
     DNSServiceErrorType err;
-    union { uint16_t s; u_char b[2]; } port = { PortInNetworkByteOrder };
+    union { uint16_t s; u_char b[2]; } port;
+
+    port.s = PortInNetworkByteOrder;
 
     if (!name) name = "";
     if (!regtype) return kDNSServiceErr_BadParam;
@@ -1975,12 +1977,15 @@ DNSServiceErrorType DNSSD_API DNSServiceNATPortMappingCreate
     char *ptr;
     size_t len;
     ipc_msg_hdr *hdr;
-    union { uint16_t s; u_char b[2]; } internalPort = { internalPortInNetworkByteOrder };
-    union { uint16_t s; u_char b[2]; } externalPort = { externalPortInNetworkByteOrder };
+    union { uint16_t s; u_char b[2]; } internalPort;
+    union { uint16_t s; u_char b[2]; } externalPort;
 
     DNSServiceErrorType err = ConnectToServer(sdRef, flags, port_mapping_request, handle_port_mapping_response, callBack, context);
     if (err) return err;    // On error ConnectToServer leaves *sdRef set to NULL
 
+    internalPort.s = internalPortInNetworkByteOrder;
+    externalPort.s = externalPortInNetworkByteOrder;
+
     len = sizeof(flags);
     len += sizeof(interfaceIndex);
     len += sizeof(protocol);
commit ddba5a4360e88ac4f6f848ac74ab1f350b9b7d5f
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Fri Aug 16 23:42:22 2013 +0300

    SAL_INFO is not available here
    
    Change-Id: Ic40cb29d9ade32690903bfa0f3993782711cc53f

diff --git a/sd/source/ui/remotecontrol/WINNetworkService.cxx b/sd/source/ui/remotecontrol/WINNetworkService.cxx
index 6e35f05..144b33a 100755
--- a/sd/source/ui/remotecontrol/WINNetworkService.cxx
+++ b/sd/source/ui/remotecontrol/WINNetworkService.cxx
@@ -7,13 +7,10 @@ void sd::WINNetworkService::setup()
 {
     DNSServiceErrorType err = DNSServiceRegister(&client, 0, 0, NULL, kREG_TYPE, "local", NULL, 1599, 1, "", NULL, this );
 
-    if ( err == 0 ) {
-        SAL_INFO("sd", "Windows bonjour service setup");
-    } // Fail silently otherwise
+    // Fail silently
 }
 
 void sd::WINNetworkService::clear()
 {
     DNSServiceRefDeallocate(client);
-    SAL_INFO("sd", "Windows mDNSResponder removed");
-}
\ No newline at end of file
+}
commit a0161828b8ea4d68fb34f02656b9a4f8604129ab
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Fri Aug 16 22:17:44 2013 +0300

    WaE: C4305: 'argument' : truncation from 'int' to 'const bool'
    
    Change-Id: I92729c7272e87c2aede6cd5134c84d17b466e57f

diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index 76a9529..a4b45a9 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -670,7 +670,17 @@ void ScEditShell::GetState( SfxItemSet& rSet )
                     if ( pActiveView )
                         rSet.Put( SfxBoolItem( nWhich, pActiveView->IsInsertMode() ) );
                     else
-                        rSet.Put( SfxBoolItem( nWhich, 42 ) );
+                    {
+                        // Here the code used to pass the value 42 and it used
+                        // to "work" without warnings because the SfxBoolItem
+                        // was based on 'sal_Bool', which is actually 'unsigned
+                        // char'. But now it uses actual 'bool', and passing 42
+                        // for a 'bool' parameter causes a warning at least with
+                        // MSVC.  So use 'true'. I really really hope there is
+                        // not code somewhere that retrieves this "boolean" item
+                        // and checks it value for the magic value 42...
+                        rSet.Put( SfxBoolItem( nWhich,  true) );
+                    }
                 }
                 break;
 


More information about the Libreoffice-commits mailing list