[vlc-devel] [PATCH] dsm: fix mismatched pointer

Steve Lhomme robux4 at ycbcr.xyz
Mon Jun 8 17:52:04 CEST 2020


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
---
 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 dfa390cb7a22..d5ed9c8937c9 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;
         }
-- 
2.26.2



More information about the vlc-devel mailing list