llvm.org GIT mirror llvm / 072362b
[MachOYAML] Use a temporary to avoid gcc strict-aliasing warning GCC complains about this with -Wstrict-aliasing. Using a temporary here should prevent the warning. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273627 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Bieneman 3 years ago
1 changed file(s) with 4 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
181181
182182 void MappingTraits::mapping(
183183 IO &IO, MachOYAML::LoadCommand &LoadCommand) {
184 IO.mapRequired(
185 "cmd", (MachO::LoadCommandType &)LoadCommand.Data.load_command_data.cmd);
184 MachO::LoadCommandType TempCmd = static_cast(
185 LoadCommand.Data.load_command_data.cmd);
186 IO.mapRequired("cmd", TempCmd);
187 LoadCommand.Data.load_command_data.cmd = TempCmd;
186188 IO.mapRequired("cmdsize", LoadCommand.Data.load_command_data.cmdsize);
187189
188190 #define HANDLE_LOAD_COMMAND(LCName, LCValue, LCStruct) \