diff mbox series

[FFmpeg-devel,v1,1/2] libavformat/protocols.c: avio_enum_protocols(): Quash warning about const-correctness

Message ID 1e033b84b49c42a888a5740736f38dc9@gmail.com
State New
Headers show
Series libavformat/protocols.c: avio_enum_protocols(): Cleanup | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Michael Witten Aug. 20, 2021, 5:45 p.m. UTC
Date: Wed, 11 Aug 2021 10:15:01 -0000
This quashes a compile-time warning.

  * 'url_protocols' is an array of const pointers.

  * The explicit conversion to '(void *)' is okay,
    because the destination is an "opaque" blob of
    private data.
---
 libavformat/protocols.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/libavformat/protocols.c b/libavformat/protocols.c
index 7f08f151b6..e0b3405ab8 100644
--- a/libavformat/protocols.c
+++ b/libavformat/protocols.c
@@ -93,10 +93,10 @@  const AVClass *ff_urlcontext_child_class_iterate(void **iter)
 
 const char *avio_enum_protocols(void **opaque, int output)
 {
-    const URLProtocol **p = *opaque;
+    const URLProtocol *const *p = *opaque;
 
     p = p ? p + 1 : url_protocols;
-    *opaque = p;
+    *opaque = (void *)p;
     if (!*p) {
         *opaque = NULL;
         return NULL;