Clear unused variable warning with GCC

pull/778/head
Jeffrey Walton 2019-01-08 17:31:53 -05:00
parent 6d5316812f
commit 7428fa82ab
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 1 additions and 1 deletions

View File

@ -512,7 +512,7 @@ void SetArgvPathHint(const char* argv0, std::string& pathHint)
// Is it possible for realpath to fail? // Is it possible for realpath to fail?
struct stat buf; int x; struct stat buf; int x;
x = lstat(pathHint.c_str(), &buf); x = lstat(pathHint.c_str(), &buf);
if (S_ISLNK(buf.st_mode)) if (x != 0 || S_ISLNK(buf.st_mode))
pathHint.clear(); pathHint.clear();
#endif #endif