aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLimin Wang <lance.lmwang@gmail.com>2020-01-13 21:44:49 +0800
committerMichael Niedermayer <michael@niedermayer.cc>2020-01-14 19:19:30 +0100
commit44a80897e86f3a8d576e8d5a14df218be767aeab (patch)
treed094722948b04542f58f991a65a254c65438f9a5
parent72a08af8ba3defe60adc894dea16c4ee9f088f88 (diff)
downloadffmpeg-44a80897e86f3a8d576e8d5a14df218be767aeab.tar.gz
avutil/avstring: Fix warning: ISO C90 forbids mixed declarations and code
Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavutil/avstring.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libavutil/avstring.c b/libavutil/avstring.c
index 76a13ba3b5..f4b8ed2b45 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