Date: Sat, 3 Sep 2011 08:00:27 GMT From: Hartmann@FreeBSD.org, "O." <ohartman@zedat.fu-berlin.de> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/160417: x11-fm/asfiles: Main.c:394:1: error: 'main' must return 'int' void main(int argc, char *argv[]) ^ 1 error generated. *** Error code 1. Compilation error while compiling with CLANG Message-ID: <201109030800.p8380Rrb005503@red.freebsd.org> Resent-Message-ID: <201109030810.p838A6JV063429@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 160417 >Category: misc >Synopsis: x11-fm/asfiles: Main.c:394:1: error: 'main' must return 'int' void main(int argc, char *argv[]) ^ 1 error generated. *** Error code 1. Compilation error while compiling with CLANG >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Sep 03 08:10:05 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Hartmann, O. >Release: FreeBSD 9.0-BETA2/amd2 clang compiled and coalng system's compiler activated >Organization: FU Berlin >Environment: >Description: Building the port with CLANG fails due to a "void main()" declarartion which seems to piss off CLANG. [...] 6 warnings generated. clang -DPACKAGE=\"Files\" -DVERSION=\"2.4e\" -DSTDC_HEADERS=1 -DHAVE_DIRENT_H=1 -DHAVE_ALLOCA=1 -DXPM=1 -DHAVE_GETWD=1 -DMAGIC_HEADERS=1 -I. -I. -I.. -I/usr/local/include -DROOTDROP_DEFAULT_ICON=\"linux_make.xpm\" -DRCFILE=\"/usr/local/share/OffiX/Filesrc\" -DMAGICFILE=\"/usr/local/share/OffiX/FilesMagic\" -DPIXDIR=\"/usr/local/include/pixmaps\" -I/usr/local/include -O3 -fno-strict-aliasing -pipe -march=native -c Errors.c Errors.c:179:3: warning: implicitly declaring C library function 'exit' with type 'void (int) __attribute__((noreturn))' exit(1); ^ Errors.c:179:3: note: please include the header <stdlib.h> or explicitly provide a declaration for 'exit' 1 warning generated. clang -DPACKAGE=\"Files\" -DVERSION=\"2.4e\" -DSTDC_HEADERS=1 -DHAVE_DIRENT_H=1 -DHAVE_ALLOCA=1 -DXPM=1 -DHAVE_GETWD=1 -DMAGIC_HEADERS=1 -I. -I. -I.. -I/usr/local/include -DROOTDROP_DEFAULT_ICON=\"linux_make.xpm\" -DRCFILE=\"/usr/local/share/OffiX/Filesrc\" -DMAGICFILE=\"/usr/local/share/OffiX/FilesMagic\" -DPIXDIR=\"/usr/local/include/pixmaps\" -I/usr/local/include -O3 -fno-strict-aliasing -pipe -march=native -c Exec.c Exec.c:95:7: warning: implicitly declaring C library function 'exit' with type 'void (int) __attribute__((noreturn))' exit(1); ^ Exec.c:95:7: note: please include the header <stdlib.h> or explicitly provide a declaration for 'exit' 1 warning generated. clang -DPACKAGE=\"Files\" -DVERSION=\"2.4e\" -DSTDC_HEADERS=1 -DHAVE_DIRENT_H=1 -DHAVE_ALLOCA=1 -DXPM=1 -DHAVE_GETWD=1 -DMAGIC_HEADERS=1 -I. -I. -I.. -I/usr/local/include -DROOTDROP_DEFAULT_ICON=\"linux_make.xpm\" -DRCFILE=\"/usr/local/share/OffiX/Filesrc\" -DMAGICFILE=\"/usr/local/share/OffiX/FilesMagic\" -DPIXDIR=\"/usr/local/include/pixmaps\" -I/usr/local/include -O3 -fno-strict-aliasing -pipe -march=native -c Fw.c Fw.c:366:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ Fw.c:657:5: warning: implicitly declaring C library function 'exit' with type 'void (int) __attribute__((noreturn))' exit(1); ^ Fw.c:657:5: note: please include the header <stdlib.h> or explicitly provide a declaration for 'exit' Fw.c:1303:20: warning: missing sentinel in function call XtVaSetValues(fw->shell,XtNinitialState,IconicState,0); ^ /usr/local/include/X11/Intrinsic.h:1598:13: note: function has been explicitly marked sentinel here extern void XtVaSetValues( ^ Fw.c:1305:20: warning: missing sentinel in function call XtVaSetValues(fw->shell,XtNinitialState,NormalState,0); ^ /usr/local/include/X11/Intrinsic.h:1598:13: note: function has been explicitly marked sentinel here extern void XtVaSetValues( ^ 4 warnings generated. clang -DPACKAGE=\"Files\" -DVERSION=\"2.4e\" -DSTDC_HEADERS=1 -DHAVE_DIRENT_H=1 -DHAVE_ALLOCA=1 -DXPM=1 -DHAVE_GETWD=1 -DMAGIC_HEADERS=1 -I. -I. -I.. -I/usr/local/include -DROOTDROP_DEFAULT_ICON=\"linux_make.xpm\" -DRCFILE=\"/usr/local/share/OffiX/Filesrc\" -DMAGICFILE=\"/usr/local/share/OffiX/FilesMagic\" -DPIXDIR=\"/usr/local/include/pixmaps\" -I/usr/local/include -O3 -fno-strict-aliasing -pipe -march=native -c FwActions.c clang -DPACKAGE=\"Files\" -DVERSION=\"2.4e\" -DSTDC_HEADERS=1 -DHAVE_DIRENT_H=1 -DHAVE_ALLOCA=1 -DXPM=1 -DHAVE_GETWD=1 -DMAGIC_HEADERS=1 -I. -I. -I.. -I/usr/local/include -DROOTDROP_DEFAULT_ICON=\"linux_make.xpm\" -DRCFILE=\"/usr/local/share/OffiX/Filesrc\" -DMAGICFILE=\"/usr/local/share/OffiX/FilesMagic\" -DPIXDIR=\"/usr/local/include/pixmaps\" -I/usr/local/include -O3 -fno-strict-aliasing -pipe -march=native -c FwCb.c clang -DPACKAGE=\"Files\" -DVERSION=\"2.4e\" -DSTDC_HEADERS=1 -DHAVE_DIRENT_H=1 -DHAVE_ALLOCA=1 -DXPM=1 -DHAVE_GETWD=1 -DMAGIC_HEADERS=1 -I. -I. -I.. -I/usr/local/include -DROOTDROP_DEFAULT_ICON=\"linux_make.xpm\" -DRCFILE=\"/usr/local/share/OffiX/Filesrc\" -DMAGICFILE=\"/usr/local/share/OffiX/FilesMagic\" -DPIXDIR=\"/usr/local/include/pixmaps\" -I/usr/local/include -O3 -fno-strict-aliasing -pipe -march=native -c Info.c clang -DPACKAGE=\"Files\" -DVERSION=\"2.4e\" -DSTDC_HEADERS=1 -DHAVE_DIRENT_H=1 -DHAVE_ALLOCA=1 -DXPM=1 -DHAVE_GETWD=1 -DMAGIC_HEADERS=1 -I. -I. -I.. -I/usr/local/include -DROOTDROP_DEFAULT_ICON=\"linux_make.xpm\" -DRCFILE=\"/usr/local/share/OffiX/Filesrc\" -DMAGICFILE=\"/usr/local/share/OffiX/FilesMagic\" -DPIXDIR=\"/usr/local/include/pixmaps\" -I/usr/local/include -O3 -fno-strict-aliasing -pipe -march=native -c Main.c Main.c:394:1: error: 'main' must return 'int' void main(int argc, char *argv[]) ^ 1 error generated. *** Error code 1 Stop in /usr/ports/x11-fm/asfiles/work/ASFiles-1.0/src. *** Error code 1 Stop in /usr/ports/x11-fm/asfiles/work/ASFiles-1.0. *** Error code 1 Stop in /usr/ports/x11-fm/asfiles. ===>>> make failed for x11-fm/asfiles ===>>> Aborting update >How-To-Repeat: try build x11-fm/asfiles with CLANG >Fix: >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201109030800.p8380Rrb005503>