mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-05 05:39:57 -05:00
Source: fix only -Wshorten-64-to-32 warning with explicit cast
This commit is contained in:
+2
-1
@@ -340,7 +340,8 @@ bool cmMachO::GetInstallName(std::string& install_name)
|
|||||||
if (lc_cmd == LC_ID_DYLIB || lc_cmd == LC_LOAD_WEAK_DYLIB ||
|
if (lc_cmd == LC_ID_DYLIB || lc_cmd == LC_LOAD_WEAK_DYLIB ||
|
||||||
lc_cmd == LC_LOAD_DYLIB) {
|
lc_cmd == LC_LOAD_DYLIB) {
|
||||||
if (sizeof(dylib_command) < cmd.LoadCommand.size()) {
|
if (sizeof(dylib_command) < cmd.LoadCommand.size()) {
|
||||||
uint32_t namelen = cmd.LoadCommand.size() - sizeof(dylib_command);
|
uint32_t namelen = static_cast<uint32_t>(cmd.LoadCommand.size() -
|
||||||
|
sizeof(dylib_command));
|
||||||
install_name.assign(&cmd.LoadCommand[sizeof(dylib_command)], namelen);
|
install_name.assign(&cmd.LoadCommand[sizeof(dylib_command)], namelen);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user