[MacPorts] #35406: xfig @3.2.5b_5 Build failure – wrong return value declaration for main()
#35406: xfig @3.2.5b_5 Build failure – wrong return value declaration for main() ---------------------------------+------------------------------------------ Reporter: hanche@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Keywords: | Port: xfig ---------------------------------+------------------------------------------ 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; }}} -- Ticket URL: <https://trac.macports.org/ticket/35406> MacPorts <http://www.macports.org/> Ports system for Mac OS
#35406: xfig @3.2.5b_5 Build failure – wrong return value declaration for main() ---------------------------------+------------------------------------------ Reporter: hanche@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Keywords: | Port: xfig ---------------------------------+------------------------------------------ Changes (by ryandesign@…): * owner: macports-tickets@… => ryandesign@… Comment: 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... -- Ticket URL: <https://trac.macports.org/ticket/35406#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#35406: xfig @3.2.5b_5 Build failure – wrong return value declaration for main() ---------------------------------+------------------------------------------ Reporter: hanche@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Keywords: | Port: xfig ---------------------------------+------------------------------------------ Comment(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. -- Ticket URL: <https://trac.macports.org/ticket/35406#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#35406: xfig @3.2.5b_5 Build failure – wrong return value declaration for main() ----------------------------------+----------------------------------------- Reporter: hanche@… | Owner: ryandesign@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: fixed | Keywords: Port: xfig | ----------------------------------+----------------------------------------- Changes (by and.damore@…): * status: new => closed * resolution: => fixed Comment: Just reproduced on 10.7.4 with XCode 4.4 while upgrading xfig. Fixed in r96209, ticket closed. -- Ticket URL: <https://trac.macports.org/ticket/35406#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts