wukenaihe / google-breakpad

Automatically exported from code.google.com/p/google-breakpad
0 stars 0 forks source link

dynamic_images.h doesn't build on gcc 3 #160

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In file included from
/Users/luser/build/mozilla/toolkit/airbag/airbag/src/client/mac/handler/dynamic_
images.cc:35:
/Users/luser/build/mozilla/toolkit/airbag/airbag/src/client/mac/handler/dynamic_
images.h:
In
   member function `void google_breakpad::DynamicImage::Print()':
/Users/luser/build/mozilla/toolkit/airbag/airbag/src/client/mac/handler/dynamic_
images.h:156:
error: parse
   error before `;' token
/Users/luser/build/mozilla/toolkit/airbag/airbag/src/client/mac/handler/dynamic_
images.h:
In
   member function `void google_breakpad::DynamicImages::TestPrint()':
/Users/luser/build/mozilla/toolkit/airbag/airbag/src/client/mac/handler/dynamic_
images.h:281:
warning: invalid
   conversion from `int' to `google_breakpad::MachHeader*'
/Users/luser/build/mozilla/toolkit/airbag/airbag/src/client/mac/handler/dynamic_
images.h:281:
error: parse
   error before `;' token
/Users/luser/build/mozilla/toolkit/airbag/airbag/src/client/mac/handler/dynamic_
images.h:281:
warning: unused
   variable `google_breakpad::MachHeader*_dyld_get_image_header'

It looks like gcc 3 fails on the constructs:
MachHeader(*GetMachHeader()).Print();
MachHeader(*_dyld_get_image_header(i)).Print();
It looks like it's the dereferencing of the function return value that
fails.  This short patch fixes it.

Original issue reported on code.google.com by ted.mielczarek on 4 May 2007 at 2:10

Attachments:

GoogleCodeExporter commented 9 years ago
Needs an extra const to compile on x86.

Original comment by ted.mielczarek on 4 May 2007 at 3:00

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by ted.mielczarek on 4 May 2007 at 7:37