[vlc-commits] url: silence pointer arithmetic warning

Rémi Denis-Courmont git at videolan.org
Sun Dec 2 18:41:49 CET 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Dec  2 19:37:52 2018 +0200| [806ad5ae5011d8a72a0a5033e8bfbff5207d0007] | committer: Rémi Denis-Courmont

url: silence pointer arithmetic warning

Clang wants array indexing here.

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

 src/text/url.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/text/url.c b/src/text/url.c
index 73644f1b19..3cfefb6aa1 100644
--- a/src/text/url.c
+++ b/src/text/url.c
@@ -913,7 +913,7 @@ char *vlc_uri_fixup(const char *str)
         encode_brackets = true;
 
         while (memchr("/?#", *p, 4) == NULL)
-            vlc_uri_putc(&stream, *(p++), "%:[]@" + encode_percent);
+            vlc_uri_putc(&stream, *(p++), &"%:[]@"[encode_percent]);
     }
 
     /* Handle URI path and what follows */



More information about the vlc-commits mailing list