[vlc-devel] [PATCH] demux/mpeg: ts_bsearch_searchkey_Compare: fix warning
Filip Roséen
filip at atch.se
Thu May 18 12:19:37 CEST 2017
The address of this function is passed to bsearch, and bsearch accepts
a pointer to int(void const*,void const*), meaning that the previous
prototype would generate a warning (and strictly speaking was not
valid).
---
modules/demux/mpeg/ts_pid.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/demux/mpeg/ts_pid.c b/modules/demux/mpeg/ts_pid.c
index 27779a04d8..eed60a3a28 100644
--- a/modules/demux/mpeg/ts_pid.c
+++ b/modules/demux/mpeg/ts_pid.c
@@ -65,7 +65,7 @@ struct searchkey
ts_pid_t **pp_last;
};
-static int ts_bsearch_searchkey_Compare( void *key, void *other )
+static int ts_bsearch_searchkey_Compare( const void *key, const void *other )
{
struct searchkey *p_key = (struct searchkey *) key;
ts_pid_t *p_pid = *((ts_pid_t **) other);
--
2.12.2
More information about the vlc-devel
mailing list