Skip to content

Commit

Permalink
Fix unused variable error for linux builds
Browse files Browse the repository at this point in the history
  • Loading branch information
ariellourenco committed Jun 29, 2024
1 parent c8fa261 commit 2c843c6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions path.c
Original file line number Diff line number Diff line change
Expand Up @@ -1572,7 +1572,7 @@ int looks_like_command_line_option(const char *str)

char *xdg_config_home_for(const char *subdir, const char *filename)
{
const char *appdata, *home, *config_home;
const char *home, *config_home;
char *home_config = NULL;

assert(subdir);
Expand All @@ -1586,9 +1586,9 @@ char *xdg_config_home_for(const char *subdir, const char *filename)
home_config = mkpathdup("%s/.config/%s/%s", home, subdir, filename);

#ifdef WIN32
appdata = getenv("APPDATA");
const char *appdata = getenv("APPDATA");

Check failure on line 1589 in path.c

View workflow job for this annotation

GitHub Actions / win build

path.c:1589:9: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
if (appdata && *appdata) {
char *appdata_config = mkpathdup("%s/Git/%s", appdata, appdata, filename);
char *appdata_config = mkpathdup("%s/Git/%s", appdata, filename);
if (file_exists(appdata_config)) {
if (home_config && file_exists(home_config))
warning("'%s' was ignored because '%s' exists.", home_config, appdata_config);
Expand Down

0 comments on commit 2c843c6

Please sign in to comment.