The branch, master has been updated
       via  1fcf872 swrap: fix another discard const warning in swrap_bind()
       via  2fb9110 swrap: fix discard const warning in swrap_bind()
       via  e520bb2 swrap: fix discard const warning in swrap_remove_stale()
       via  97bb223 swrap: fix build when neither HAVE_STRUCT_IN_PKTINFO nor 
IP_RECVDSTADDR is defined
       via  f0aeb93 torture: add HAVE_IPV6 guard to torture_server_address()
       via  647161c cmake: Add more build warnings and errors.
       via  248c7c2 fix .gitignore for vi backup files
      from  f914a1e doc: Add a socket_wrapper manpage.

http://gitweb.samba.org/?p=socket_wrapper.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 1fcf8726753f38651d009c63d12a179854b506b8
Author: Michael Adam <ob...@samba.org>
Date:   Tue Jun 3 21:50:11 2014 +0200

    swrap: fix another discard const warning in swrap_bind()
    
    Signed-off-by: Michael Adam <ob...@samba.org>
    Reviewed-by: Andreas Schneider <a...@samba.org>

commit 2fb911049a5d5aaa51597458ee382b75121a6cef
Author: Michael Adam <ob...@samba.org>
Date:   Tue Jun 3 21:49:12 2014 +0200

    swrap: fix discard const warning in swrap_bind()
    
    Signed-off-by: Michael Adam <ob...@samba.org>
    Reviewed-by: Andreas Schneider <a...@samba.org>

commit e520bb2cfb189750fd8656431156d44d7c3e3f91
Author: Michael Adam <ob...@samba.org>
Date:   Tue Jun 3 21:48:01 2014 +0200

    swrap: fix discard const warning in swrap_remove_stale()
    
    Signed-off-by: Michael Adam <ob...@samba.org>
    Reviewed-by: Andreas Schneider <a...@samba.org>

commit 97bb22328076b5b067853be4c56dee4ac87e6420
Author: Michael Adam <ob...@samba.org>
Date:   Tue Jun 3 15:52:43 2014 +0200

    swrap: fix build when neither HAVE_STRUCT_IN_PKTINFO nor IP_RECVDSTADDR is 
defined
    
    Signed-off-by: Michael Adam <ob...@samba.org>
    Reviewed-by: Andreas Schneider <a...@samba.org>

commit f0aeb93c9b47a869bbeed422c77895d6cd3dd76f
Author: Michael Adam <ob...@samba.org>
Date:   Wed Jun 4 09:35:02 2014 +0200

    torture: add HAVE_IPV6 guard to torture_server_address()
    
    Signed-off-by: Michael Adam <ob...@samba.org>
    Reviewed-by: Andreas Schneider <a...@samba.org>

commit 647161c0f7b0c3b86ec2dcca68cb0116755a3eab
Author: Andreas Schneider <a...@samba.org>
Date:   Tue Jun 3 15:52:43 2014 +0200

    cmake: Add more build warnings and errors.
    
    Signed-off-by: Andreas Schneider <a...@samba.org>
    Reviewed-by: Michael Adam <ob...@samba.org>

commit 248c7c2087cb73642866b557d69fe35a82147c0c
Author: Michael Adam <ob...@samba.org>
Date:   Fri Jun 6 00:55:11 2014 +0200

    fix .gitignore for vi backup files
    
    Signed-off-by: Michael Adam <ob...@samba.org>
    Reviewed-by: Andreas Schneider <a...@samba.org>

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

Summary of changes:
 .gitignore                              |    2 +-
 cmake/Modules/DefineCompilerFlags.cmake |    5 +++--
 src/socket_wrapper.c                    |   11 +++++------
 tests/torture.c                         |    2 ++
 4 files changed, 11 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/.gitignore b/.gitignore
index 8fd1310..5d8f581 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,7 +2,7 @@
 *.o
 .*
 *.swp
-*~$
+*~
 build
 obj
 cscope.*
diff --git a/cmake/Modules/DefineCompilerFlags.cmake 
b/cmake/Modules/DefineCompilerFlags.cmake
index e6fab88..218f4fe 100644
--- a/cmake/Modules/DefineCompilerFlags.cmake
+++ b/cmake/Modules/DefineCompilerFlags.cmake
@@ -14,10 +14,11 @@ if (UNIX AND NOT WIN32)
 
         set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wshadow 
-Wmissing-prototypes -Wdeclaration-after-statement")
         set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wunused -Wfloat-equal 
-Wpointer-arith -Wwrite-strings -Wformat-security")
-        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-format-attribute")
+        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-format-attribute 
-Wcast-align -Wcast-qual")
 
         set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=pointer-arith 
-Werror=declaration-after-statement")
-        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} 
-Werror=implicit-function-declaration")
+        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} 
-Werror=implicit-function-declaration -Werror=write-strings")
+        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=int-to-pointer-cast 
-Werror=pointer-to-int-cast")
 
         # with -fPIC
         check_c_compiler_flag("-fPIC" WITH_FPIC)
diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c
index afd9343..7ee5b64 100644
--- a/src/socket_wrapper.c
+++ b/src/socket_wrapper.c
@@ -1394,14 +1394,14 @@ static int sockaddr_convert_to_un(struct socket_info 
*si,
 
        switch (in_addr->sa_family) {
        case AF_UNSPEC: {
-               struct sockaddr_in *sin;
+               const struct sockaddr_in *sin;
                if (si->family != AF_INET) {
                        break;
                }
                if (in_len < sizeof(struct sockaddr_in)) {
                        break;
                }
-               sin = (struct sockaddr_in *)in_addr;
+               sin = (const struct sockaddr_in *)in_addr;
                if(sin->sin_addr.s_addr != htonl(INADDR_ANY)) {
                        break;
                }
@@ -2846,7 +2846,7 @@ static int swrap_bind(int s, const struct sockaddr 
*myaddr, socklen_t addrlen)
                        break;
                }
 
-               sin = (struct sockaddr_in *)myaddr;
+               sin = (const struct sockaddr_in *)myaddr;
 
                if (sin->sin_family != AF_INET) {
                        bind_error = EAFNOSUPPORT;
@@ -2869,7 +2869,7 @@ static int swrap_bind(int s, const struct sockaddr 
*myaddr, socklen_t addrlen)
                        break;
                }
 
-               sin6 = (struct sockaddr_in6 *)myaddr;
+               sin6 = (const struct sockaddr_in6 *)myaddr;
 
                if (sin6->sin6_family != AF_INET6) {
                        bind_error = EAFNOSUPPORT;
@@ -3407,8 +3407,7 @@ static int swrap_msghdr_add_pktinfo(struct socket_info 
*si,
 {
        /* Add packet info */
        switch (si->pktinfo) {
-#if defined(IP_PKTINFO)
-/* && (defined(HAVE_STRUCT_IN_PKTINFO) || defined(IP_RECVDSTADDR)) */
+#if defined(IP_PKTINFO) && (defined(HAVE_STRUCT_IN_PKTINFO) || 
defined(IP_RECVDSTADDR))
        case AF_INET: {
                struct sockaddr_in *sin;
 #if defined(HAVE_STRUCT_IN_PKTINFO)
diff --git a/tests/torture.c b/tests/torture.c
index 9a1d1ce..02ddc96 100644
--- a/tests/torture.c
+++ b/tests/torture.c
@@ -70,6 +70,7 @@ const char *torture_server_address(int family)
 
                return TORTURE_ECHO_SRV_IPV4;
        }
+#ifdef HAVE_IPV6
        case AF_INET6: {
                const char *ip6 = getenv("TORTURE_SERVER_ADDRESS_IPV6");
 
@@ -79,6 +80,7 @@ const char *torture_server_address(int family)
 
                return TORTURE_ECHO_SRV_IPV6;
        }
+#endif
        default:
                return NULL;
        }


-- 
Socket Wrapper Repository

Reply via email to