[llvm] r189319 - Fix the build broken by r189315.
Charles Davis
cdavis5x at gmail.com
Mon Aug 26 22:23:56 PDT 2013
On Aug 26, 2013, at 11:16 PM, David Blaikie wrote:
> Author: dblaikie
> Date: Tue Aug 27 00:16:07 2013
> New Revision: 189319
>
> URL: http://llvm.org/viewvc/llvm-project?rev=189319&view=rev
> Log:
> Fix the build broken by r189315.
>
> (this triggered Clang's -Wsometimes-uninitialized on the default path
> through the switch)
Oops... I was about to go fix this, but it looks like you beat me to it! Sorry, and thanks.
I'm not sure why I never saw this. I build with Clang all the time.
Chip
>
> Modified:
> llvm/trunk/tools/macho-dump/macho-dump.cpp
>
> Modified: llvm/trunk/tools/macho-dump/macho-dump.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/macho-dump/macho-dump.cpp?rev=189319&r1=189318&r2=189319&view=diff
> ==============================================================================
> --- llvm/trunk/tools/macho-dump/macho-dump.cpp (original)
> +++ llvm/trunk/tools/macho-dump/macho-dump.cpp Tue Aug 27 00:16:07 2013
> @@ -322,36 +322,27 @@ DumpLinkerOptionsCommand(const MachOObje
>
> static int DumpLoadCommand(const MachOObjectFile &Obj,
> MachOObjectFile::LoadCommandInfo &LCI) {
> - int Res;
> switch (LCI.C.cmd) {
> case MachO::LC_SEGMENT:
> - Res = DumpSegmentCommand(Obj, LCI);
> - break;
> + return DumpSegmentCommand(Obj, LCI);
> case MachO::LC_SEGMENT_64:
> - Res = DumpSegment64Command(Obj, LCI);
> - break;
> + return DumpSegment64Command(Obj, LCI);
> case MachO::LC_SYMTAB:
> - Res = DumpSymtabCommand(Obj);
> - break;
> + return DumpSymtabCommand(Obj);
> case MachO::LC_DYSYMTAB:
> - Res = DumpDysymtabCommand(Obj);
> - break;
> + return DumpDysymtabCommand(Obj);
> case MachO::LC_CODE_SIGNATURE:
> case MachO::LC_SEGMENT_SPLIT_INFO:
> case MachO::LC_FUNCTION_STARTS:
> - Res = DumpLinkeditDataCommand(Obj, LCI);
> - break;
> + return DumpLinkeditDataCommand(Obj, LCI);
> case MachO::LC_DATA_IN_CODE:
> - Res = DumpDataInCodeDataCommand(Obj, LCI);
> - break;
> + return DumpDataInCodeDataCommand(Obj, LCI);
> case MachO::LC_LINKER_OPTIONS:
> - Res = DumpLinkerOptionsCommand(Obj, LCI);
> - break;
> + return DumpLinkerOptionsCommand(Obj, LCI);
> default:
> Warning("unknown load command: " + Twine(LCI.C.cmd));
> - break;
> + return 0;
> }
> - return Res;
> }
>
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list