Opened 12 years ago
Closed 12 years ago
#35406 closed defect (fixed)
xfig @3.2.5b_5 Build failure – wrong return value declaration for main()
Reported by: | hanche | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.1.2 |
Keywords: | Cc: | carl.mummert@… | |
Port: | xfig |
Description
Xfig did not build for me using clang because main() is declared to return void, and clang issued an error instead of just a warning (as I would have expected). The fix is of course trivial:
--- main.c_ORIG 2009-03-30 17:52:18.000000000 +0200 +++ main.c 2012-07-29 16:48:38.000000000 +0200 @@ -629,7 +629,7 @@ int setup_visual (int *argc_p, char **argv, Arg *args); void get_pointer_mapping (void); -void main(int argc, char **argv) +int main(int argc, char **argv) { Widget children[NCHILDREN]; XEvent event;
Change History (4)
comment:1 follow-up: 2 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Owner: | changed from macports-tickets@… to ryandesign@… |
---|
comment:2 Changed 12 years ago by hanche
Yeah, sorry I didn't mention that. OS X 10.7.4, Xcode 4.3.2.
And oddly enough, xfig @3.2.5b_4 compiled fine, though I don't know what versions I had when I built that.
I did see the ticket and patch you refer to, but they didn't touch main.
comment:4 Changed 12 years ago by anddam (Andrea D'Amore)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Just reproduced on 10.7.4 with XCode 4.4 while upgrading xfig.
Fixed in r96209, ticket closed.
Note: See
TracTickets for help on using
tickets.
On what OS X version did you encounter this error with what version of Xcode? I just fixed it yesterday to compile correctly on Mountain Lion with Xcode 4.4...