[vcpkg] Fix warning on Apple (#5333)

Return type of _NSGetExecutablePath is int rather than bool [1],
causing a warning on Apple.

[1] https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/dyld.3.html
This commit is contained in:
Marco Craveiro 2019-02-09 02:06:08 +00:00 committed by Robert Schumacher
parent 4cbd210154
commit d82f37b4bf

View File

@ -30,7 +30,7 @@ namespace vcpkg::System
static constexpr const uint32_t buff_size = 1024 * 32;
uint32_t size = buff_size;
char buf[buff_size] = {};
bool result = _NSGetExecutablePath(buf, &size);
int result = _NSGetExecutablePath(buf, &size);
Checks::check_exit(VCPKG_LINE_INFO, result != -1, "Could not determine current executable path.");
std::unique_ptr<char> canonicalPath(realpath(buf, NULL));
Checks::check_exit(VCPKG_LINE_INFO, result != -1, "Could not determine current executable path.");