xv: Silence build warning regarding const qualifier
PATCH v2 1/1 xv: Silence build warning regarding const qualifier
Silences warning with gcc 8.2:
nouveau_xv.c: In function ‘NVInitVideo’:
nouveau_xv.c:2247:68: warning: passing argument 2 of ‘vlCreateAdaptorXvMC’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
adaptorsXvMC[0] = vlCreateAdaptorXvMC(pScreen, textureAdaptor[0]->name);
~~~~~~~~~~~~~~~~~^~~~~~
In file included from nouveau_xv.c:42:
vl_hwmc.h:6:63: note: expected ‘char *’ but argument is of type ‘const char *’
XF86MCAdaptorPtr vlCreateAdaptorXvMC(ScreenPtr pScreen, char *xv_adaptor_name);
~~~~~~^~~~~~~~~~~~~~~Signed-off-by Rhys Kidd <[email protected]>
Reviewed-by Ilia Mirkin <[email protected]>
---
Appears that I don't have committer rights to xf86-video-nouveau on git.freedesktop.org.
Ilia: Would you be able to push this patch to master?
src/nouveau_xv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/nouveau_xv.c +1 -1
@@ -2244,7 +2244,7 @@ NVInitVideo(ScreenPtr pScreen)XF86MCAdaptorPtr *adaptorsXvMC =malloc (sizeof (XF86MCAdaptorPtr));if (adaptorsXvMC) { - adaptorsXvMC[0 ] =vlCreateAdaptorXvMC (pScreen, textureAdaptor[0 ]->name); + adaptorsXvMC[0 ] =vlCreateAdaptorXvMC (pScreen, (char *)textureAdaptor[0 ]->name);if (adaptorsXvMC[0 ]) {vlInitXvMC (pScreen,1 , adaptorsXvMC);
Signature · 6 lines
2.19.1 _______________________________________________ Nouveau mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/nouveau