diff --git a/src/p_mach.cpp b/src/p_mach.cpp index 83e19fe0..5c2ea759 100644 --- a/src/p_mach.cpp +++ b/src/p_mach.cpp @@ -649,7 +649,7 @@ void PackMachFat::pack(OutputFile *fo) unsigned const in_size = this->file_size; fo->write(&fat_head, sizeof(fat_head.fat) + fat_head.fat.nfat_arch * sizeof(fat_head.arch[0])); - unsigned length; + unsigned length = 0; for (unsigned j=0; j < fat_head.fat.nfat_arch; ++j) { unsigned base = fo->unset_extent(); // actual length base += ~(~0u< typedef PackMachBase super; public: - PackMachPPC32::PackMachPPC32(InputFile *f) : super(f, Mach_header::CPU_TYPE_POWERPC, + PackMachPPC32(InputFile *f) : super(f, Mach_header::CPU_TYPE_POWERPC, Mach_thread_command::PPC_THREAD_STATE, sizeof(Mach_ppc_thread_state)>>2, sizeof(threado)) { } @@ -433,8 +438,9 @@ protected: Mach_ppc_thread_state state; #define WANT_MACH_THREAD_ENUM #include "p_mach_enum.h" - } threado + } __attribute_packed; + Mach_thread_command threado; }; class PackMachI386 : public PackMachBase @@ -475,8 +481,9 @@ protected: Mach_i386_thread_state state; #define WANT_MACH_THREAD_ENUM #include "p_mach_enum.h" - } threado + } __attribute_packed; + Mach_thread_command threado; }; class PackMachFat : public Packer