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 0a250b7 commit ca711e8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 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");
if (appdata && *appdata) {
char *appdata_config = mkpathdup("%s/Git/%s", appdata, appdata, filename);
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, 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 ca711e8

Please sign in to comment.