From owner-freebsd-bugs@FreeBSD.ORG Fri Jun 6 06:10:05 2008 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34ED61065684 for ; Fri, 6 Jun 2008 06:10:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 071428FC13 for ; Fri, 6 Jun 2008 06:10:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m566A4sK055978 for ; Fri, 6 Jun 2008 06:10:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m566A4vt055977; Fri, 6 Jun 2008 06:10:04 GMT (envelope-from gnats) Resent-Date: Fri, 6 Jun 2008 06:10:04 GMT Resent-Message-Id: <200806060610.m566A4vt055977@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Garrett Cooper Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28E6B106566C for ; Fri, 6 Jun 2008 06:08:16 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 0D1B08FC18 for ; Fri, 6 Jun 2008 06:08:16 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m5668Aas019317 for ; Fri, 6 Jun 2008 06:08:15 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.2/8.14.1/Submit) id m5668AmP019316; Fri, 6 Jun 2008 06:08:10 GMT (envelope-from nobody) Message-Id: <200806060608.m5668AmP019316@www.freebsd.org> Date: Fri, 6 Jun 2008 06:08:10 GMT From: Garrett Cooper To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: misc/124342: sbin/ggate/ggated/ggated.c fails to compile under -CURRENT with default warning settings and custom CFLAGs X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jun 2008 06:10:05 -0000 >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: