For the sake of completeness and scope correctness, the declaration and initialization of 'p' has been moved into the 'for(;;)' statement.
--- libavformat/protocols.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavformat/protocols.c b/libavformat/protocols.c index e3cde9ce02..9ce98968fa 100644 --- a/libavformat/protocols.c +++ b/libavformat/protocols.c @@ -94,8 +94,7 @@ const AVClass *ff_urlcontext_child_class_iterate(void **iter) const char *avio_enum_protocols(void **const opaque, const int output) { typedef const URLProtocol *const *Iterator; - Iterator p = *opaque ? (Iterator)(*opaque) + 1 : url_protocols; - for(; *p; ++p) { + for(Iterator p = *opaque ? (Iterator)(*opaque) + 1 : url_protocols; *p; ++p) { if ((output && (*p)->url_write) || (!output && (*p)->url_read)) { *opaque = (void *)p; return (*p)->name; -- 2.22.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".