[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Wed Jun 8 06:50:02 UTC 2016


The branch, master has been updated
       via  6888c17 build: Address may be used uninitialized in this function on Ubuntu 10.04
       via  2a5183f build: Try to work around strict aliasing rules on Ubuntu 10.04
      from  b7073d4 ctdb-cluster-mutex: Fix #endif decoration

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 6888c172d3f2ed471fac626ee9a50bb092367054
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Fri Jun 3 09:53:29 2016 +1200

    build: Address may be used uninitialized in this function on Ubuntu 10.04
    
    This is not found by modern compilers, but prevents the -Werror -O3 build on Ubuntu 10.04
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Wed Jun  8 08:48:57 CEST 2016 on sn-devel-144

commit 2a5183f49efc1d407ed36c457d8a953e1363eb42
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Fri Jun 3 09:23:12 2016 +1200

    build: Try to work around strict aliasing rules on Ubuntu 10.04
    
    We get cc1: warnings being treated as errors
    ../lib/util/util_net.c: In function get_socket_port:
    ../lib/util/util_net.c:921: error: dereferencing pointer sa.106 does break strict-aliasing rules
    ../lib/util/util_net.c:921: note: initialized from here
    ../lib/util/util_net.c:925: error: dereferencing pointer sa.107 does break strict-aliasing rules
    ../lib/util/util_net.c:925: note: initialized from here
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 lib/dbwrap/dbwrap_rbt.c | 3 ++-
 lib/util/util_net.c     | 6 ++++--
 2 files changed, 6 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/dbwrap/dbwrap_rbt.c b/lib/dbwrap/dbwrap_rbt.c
index 3b5e589..eb5ef10 100644
--- a/lib/dbwrap/dbwrap_rbt.c
+++ b/lib/dbwrap/dbwrap_rbt.c
@@ -277,7 +277,8 @@ static bool db_rbt_search_internal(struct db_context *db, TDB_DATA key,
 	struct rb_node *n;
 	bool found = false;
 	struct db_rbt_node *r = NULL;
-	TDB_DATA search_key, search_val;
+	TDB_DATA search_key = { 0 };
+	TDB_DATA search_val = { 0 };
 
 	n = ctx->tree.rb_node;
 
diff --git a/lib/util/util_net.c b/lib/util/util_net.c
index e5b33aa..cb238ad 100644
--- a/lib/util/util_net.c
+++ b/lib/util/util_net.c
@@ -918,11 +918,13 @@ int get_socket_port(int fd)
 
 #if defined(HAVE_IPV6)
 	if (sa.ss_family == AF_INET6) {
-		return ntohs(((struct sockaddr_in6 *)&sa)->sin6_port);
+		struct sockaddr_in6 *sa_in6 = (struct sockaddr_in6 *)&sa;
+		return ntohs(sa_in6->sin6_port);
 	}
 #endif
 	if (sa.ss_family == AF_INET) {
-		return ntohs(((struct sockaddr_in *)&sa)->sin_port);
+		struct sockaddr_in *sa_in = (struct sockaddr_in *)&sa;
+		return ntohs(sa_in->sin_port);
 	}
 	return -1;
 }


-- 
Samba Shared Repository



More information about the samba-cvs mailing list