diff options
author | Limin Wang <lance.lmwang@gmail.com> | 2020-01-13 21:44:49 +0800 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-01-14 19:19:30 +0100 |
commit | 44a80897e86f3a8d576e8d5a14df218be767aeab (patch) | |
tree | d094722948b04542f58f991a65a254c65438f9a5 | |
parent | 72a08af8ba3defe60adc894dea16c4ee9f088f88 (diff) | |
download | ffmpeg-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.c | 8 |
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 |