Commit a8e0e96a by Rémi Verschelde

Fix unused-result warning for chdir

Fixes this warning:

Source/main.cpp: In function 'void chdirToAppPath(const char*)':
Source/main.cpp:581:14: warning: ignoring return value of 'int chdir(const char*)', declared with attribute warn_unused_result [-Wunused-result]
         chdir(dir);
         ~~~~~^~~~~
parent 8f8250f2
Pipeline #11497376 passed with stage
in 4 minutes 56 seconds
......@@ -579,7 +579,10 @@ static inline void chdirToAppPath(const char* argv0)
*ptr = '\0';
}
#endif
chdir(dir);
errno = 0;
if (chdir(dir) != 0) {
printf("Error changing dir to '%s' (%s).\n", dir, strerror(errno));
}
free(dir);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment