Nouveau Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rhys Kidd <rhyskidd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: [PATCH xf86-video-nouveau v2] xv: Silence build warning regarding const qualifier
Date: Sun, 20 Jan 2019 14:50:35 -0500	[thread overview]
Message-ID: <20190120195035.14046-1-rhyskidd@gmail.com> (raw)

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 <rhyskidd@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
---

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(-)

diff --git a/src/nouveau_xv.c b/src/nouveau_xv.c
index a7ec21a..3258ef7 100644
--- a/src/nouveau_xv.c
+++ b/src/nouveau_xv.c
@@ -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);
-- 
2.19.1

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

                 reply	other threads:[~2019-01-20 19:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190120195035.14046-1-rhyskidd@gmail.com \
    --to=rhyskidd-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox