Browse Source

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>
tags/n4.3
Limin Wang Michael Niedermayer 6 years ago
parent
commit
44a80897e8
1 changed files with 5 additions and 3 deletions
  1. +5
    -3
      libavutil/avstring.c

+ 5
- 3
libavutil/avstring.c View File

@@ -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



Loading…
Cancel
Save