[vlc-commits] dsm: fix mismatched pointer

Steve Lhomme git at videolan.org
Wed Jun 10 14:14:09 CEST 2020


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Jun  8 17:13:55 2020 +0200| [009bce07f3263158e439f8b99cf6d74d782da303] | committer: Steve Lhomme

dsm: fix mismatched pointer

Fixes this warning with clang10:
incompatible pointer types passing 'u_long *' (aka 'unsigned long *') to parameter of type 'uint32_t *' (aka 'unsigned int *')

Similar to what is done in access/smb2.c

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=009bce07f3263158e439f8b99cf6d74d782da303
---

 modules/access/dsm/access.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/access/dsm/access.c b/modules/access/dsm/access.c
index dfa390cb7a..d5ed9c8937 100644
--- a/modules/access/dsm/access.c
+++ b/modules/access/dsm/access.c
@@ -279,10 +279,12 @@ static int get_address( stream_t *p_access )
         struct addrinfo *p_info = NULL;
 
         /* Is this a netbios name on this LAN ? */
+        uint32_t ip4_addr;
         if( netbios_ns_resolve( p_sys->p_ns, p_sys->url.psz_host,
                                 NETBIOS_FILESERVER,
-                                &p_sys->addr.s_addr) == 0 )
+                                &ip4_addr) == 0 )
         {
+            p_sys->addr.s_addr = ip4_addr;
             strlcpy( p_sys->netbios_name, p_sys->url.psz_host, 16);
             return VLC_SUCCESS;
         }



More information about the vlc-commits mailing list