<div dir="ltr"><div dir="ltr">On Sat, 19 Jan 2019 at 18:32, Ilia Mirkin <<a href="mailto:imirkin@alum.mit.edu">imirkin@alum.mit.edu</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Is vlCreateAdaptorXvMC just silly, or does it really want to take<br>
ownership of the name pointer?<br></blockquote><div><br></div><div>vlCreateAdaptorXvMC( ) doesn't need to take over ownership of the name pointer, so yes - I guess it's being silly in one respect by not being specific about const.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
On Sat, Jan 19, 2019 at 6:30 PM Rhys Kidd <<a href="mailto:rhyskidd@gmail.com" target="_blank">rhyskidd@gmail.com</a>> wrote:<br>
><br>
> Fixes warning with gcc 8.2:<br>
><br>
> nouveau_xv.c: In function ‘NVInitVideo’:<br>
> nouveau_xv.c:2247:68: warning: passing argument 2 of ‘vlCreateAdaptorXvMC’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]<br>
> adaptorsXvMC[0] = vlCreateAdaptorXvMC(pScreen, textureAdaptor[0]->name);<br>
> ~~~~~~~~~~~~~~~~~^~~~~~<br>
> In file included from nouveau_xv.c:42:<br>
> vl_hwmc.h:6:63: note: expected ‘char *’ but argument is of type ‘const char *’<br>
> XF86MCAdaptorPtr vlCreateAdaptorXvMC(ScreenPtr pScreen, char *xv_adaptor_name);<br>
> ~~~~~~^~~~~~~~~~~~~~~<br>
><br>
> Signed-off-by: Rhys Kidd <<a href="mailto:rhyskidd@gmail.com" target="_blank">rhyskidd@gmail.com</a>><br>
> ---<br>
> src/nouveau_xv.c | 2 +-<br>
> 1 file changed, 1 insertion(+), 1 deletion(-)<br>
><br>
> diff --git a/src/nouveau_xv.c b/src/nouveau_xv.c<br>
> index a7ec21a..3258ef7 100644<br>
> --- a/src/nouveau_xv.c<br>
> +++ b/src/nouveau_xv.c<br>
> @@ -2244,7 +2244,7 @@ NVInitVideo(ScreenPtr pScreen)<br>
> XF86MCAdaptorPtr *adaptorsXvMC = malloc(sizeof(XF86MCAdaptorPtr));<br>
><br>
> if (adaptorsXvMC) {<br>
> - adaptorsXvMC[0] = vlCreateAdaptorXvMC(pScreen, textureAdaptor[0]->name);<br>
> + adaptorsXvMC[0] = vlCreateAdaptorXvMC(pScreen, (char *)textureAdaptor[0]->name);<br>
><br>
> if (adaptorsXvMC[0]) {<br>
> vlInitXvMC(pScreen, 1, adaptorsXvMC);<br>
> --<br>
> 2.19.1<br>
><br>
> _______________________________________________<br>
> Nouveau mailing list<br>
> <a href="mailto:Nouveau@lists.freedesktop.org" target="_blank">Nouveau@lists.freedesktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/nouveau" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/nouveau</a><br>
</blockquote></div></div>