Skip to content

Commit

Permalink
avutil/avstring: Fix warning: ISO C90 forbids mixed declarations and …
Browse files Browse the repository at this point in the history
…code

Signed-off-by: Limin Wang <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>
  • Loading branch information
lance-lmwang authored and michaelni committed Jan 14, 2020
1 parent 72a08af commit 44a8089
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions libavutil/avstring.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 44a8089

Please sign in to comment.