Date: Fri, 6 Jun 2008 06:08:10 GMT From: Garrett Cooper <gcooper@FreeBSD.org> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/124342: sbin/ggate/ggated/ggated.c fails to compile under -CURRENT with default warning settings and custom CFLAGs Message-ID: <200806060608.m5668AmP019316@www.freebsd.org> Resent-Message-ID: <200806060610.m566A4vt055977@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 124342 >Category: misc >Synopsis: sbin/ggate/ggated/ggated.c fails to compile under -CURRENT with default warning settings and custom CFLAGs >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: Fri Jun 06 06:10:04 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Garrett Cooper >Release: 8-CURRENT >Organization: n/a >Environment: FreeBSD optimus 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Mon May 19 02:21:07 PDT 2008 root@optimus:/usr/obj/usr/src/sys/OPTIMUS i386 >Description: ggated fails to compile with the following error: /devel/ncvs/src/sbin/ggate/ggated/ggated.c: In function 'disk_thread': /devel/ncvs/src/sbin/ggate/ggated/ggated.c:759: warning: no return statement in function returning non-void /devel/ncvs/src/sbin/ggate/ggated/ggated.c: In function 'send_thread': /devel/ncvs/src/sbin/ggate/ggated/ggated.c:813: warning: no return statement in function returning non-void [gcooper@optimus ~]$ grep -E 'CFLAGS|CPUTYPE' /etc/make.conf CFLAGS=-O3 -pipe -fno-strict-aliasing CPUTYPE=prescott >How-To-Repeat: 1. Checkout srcs from cvs. 2. cd .../src/sbin/ggate/ggated && make all >Fix: A proposed patch is attached (simple, I know), and I've attached some comments for the author / maintainer of ggate. I'd like to make sure that a return value of (void*) NULL is appropriate though, in both cases where return values were required... Patch attached with submission follows: Index: sbin/ggate/ggated/ggated.c =================================================================== RCS file: /home/ncvs/src/sbin/ggate/ggated/ggated.c,v retrieving revision 1.9 diff -r1.9 ggated.c 105a106,108 > /* > * XXX: See comment in connection_launch(..). > */ 106a110,112 > /* > * XXX: See comment in bottom of function. > */ 579a586,593 > > /** > * XXX: Does disk thread really need a return value if it's just > * tossed here (or is this future work to make into a pthread_create(3) > * call?) > * > * (gcooper) > */ 580a595 > 682a698,700 > /* > * XXX: See comment in connection_launch(..) > */ 758a777,779 > > return (void*) NULL; > 812a834,843 > > /** > * XXX: Is this a correct return value? > * According to the prototype and the > * definition above this _must_ have a > * return value... > * (gcooper) > **/ > return (void*) NULL; > >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200806060608.m5668AmP019316>