[vlc-commits] objects: fix invalid function pointer conversion

Rémi Denis-Courmont git at videolan.org
Tue Jan 15 17:43:31 CET 2019


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Jan 15 18:40:36 2019 +0200| [129673352f0cf63c21a4e46f17ee97cc32a3057c] | committer: Rémi Denis-Courmont

objects: fix invalid function pointer conversion

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

 src/misc/objects.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/misc/objects.c b/src/misc/objects.c
index 51ddb02706..bce646a314 100644
--- a/src/misc/objects.c
+++ b/src/misc/objects.c
@@ -367,6 +367,11 @@ static vlc_object_t *FindName (vlc_object_t *obj, const char *name)
     return found;
 }
 
+static int strcmp_void(const void *a, const void *b)
+{
+    return strcmp(a, b);
+}
+
 #undef vlc_object_find_name
 /**
  * Finds a named object and increment its reference count.
@@ -397,7 +402,7 @@ vlc_object_t *vlc_object_find_name( vlc_object_t *p_this, const char *psz_name )
      * wannabe code janitors, this is the list of names that remain used
      * and unfixed since then. */
     static const char bad[][5] = { "v4l2", "zvbi" };
-    if( bsearch( psz_name, bad, 2, 5, (void *)strcmp ) == NULL )
+    if( bsearch( psz_name, bad, 2, 5, strcmp_void ) == NULL )
         return NULL;
     msg_Err( p_this, "looking for object \"%s\"... FIXME XXX", psz_name );
 #endif



More information about the vlc-commits mailing list