diff mbox series

[FFmpeg-devel,v1,1/3] avutil/avstring: Fix warning: ISO C90 forbids mixed declarations and code

Message ID 20200113134451.9511-1-lance.lmwang@gmail.com
State New
Headers show
Series [FFmpeg-devel,v1,1/3] avutil/avstring: Fix warning: ISO C90 forbids mixed declarations and code
Related show

Checks

Context Check Description
andriy/ffmpeg-patchwork pending
andriy/ffmpeg-patchwork success Applied patch
andriy/ffmpeg-patchwork success Configure finished
andriy/ffmpeg-patchwork success Make finished
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Limin Wang Jan. 13, 2020, 1:44 p.m. UTC
From: Limin Wang <lance.lmwang@gmail.com>

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
---
 libavutil/avstring.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Comments

Michael Niedermayer Jan. 14, 2020, 5:04 p.m. UTC | #1
On Mon, Jan 13, 2020 at 09:44:49PM +0800, lance.lmwang@gmail.com wrote:
> From: Limin Wang <lance.lmwang@gmail.com>
> 
> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
> ---
>  libavutil/avstring.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)

will apply

thx

[...]
diff mbox series

Patch

diff --git a/libavutil/avstring.c b/libavutil/avstring.c
index 76a13ba..f4b8ed2 100644
--- a/libavutil/avstring.c
+++ b/libavutil/avstring.c
@@ -258,15 +258,17 @@  char *av_strireplace(const char *str, const char *from, const char *to)
 const char *av_basename(const char *path)
 {
     char *p;
+#if HAVE_DOS_PATHS
+    char *q, *d;
+#endif
 
     if (!path || *path == '\0')
         return ".";
 
     p = strrchr(path, '/');
 #if HAVE_DOS_PATHS
-    char *q = strrchr(path, '\\');
-    char *d = strchr(path, ':');
-
+    q = strrchr(path, '\\');
+    d = strchr(path, ':');
     p = FFMAX3(p, q, d);
 #endif