From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Aug 27 14:20:00 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8BCA7186 for ; Tue, 27 Aug 2013 14:20:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6A6F42AD6 for ; Tue, 27 Aug 2013 14:20:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r7REK0Q9000301 for ; Tue, 27 Aug 2013 14:20:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r7REK0a1000300; Tue, 27 Aug 2013 14:20:00 GMT (envelope-from gnats) Resent-Date: Tue, 27 Aug 2013 14:20:00 GMT Resent-Message-Id: <201308271420.r7REK0a1000300@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Nathanael Hoyle Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7ADF1FA6 for ; Tue, 27 Aug 2013 14:15:01 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 681E72AA5 for ; Tue, 27 Aug 2013 14:15:01 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r7REF07v063301 for ; Tue, 27 Aug 2013 14:15:00 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r7REF0s5063300; Tue, 27 Aug 2013 14:15:00 GMT (envelope-from nobody) Message-Id: <201308271415.r7REF0s5063300@oldred.freebsd.org> Date: Tue, 27 Aug 2013 14:15:00 GMT From: Nathanael Hoyle To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/181584: x11/nvidia-driver NVIDIA-FreeBSD-x86_64-319.32 fails to build due to uninitialized data warning and -Werror flag X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 14:20:00 -0000 >Number: 181584 >Category: ports >Synopsis: x11/nvidia-driver NVIDIA-FreeBSD-x86_64-319.32 fails to build due to uninitialized data warning and -Werror flag >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Aug 27 14:20:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Nathanael Hoyle >Release: 9.1-RELEASE >Organization: >Environment: FreeBSD tsuba 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec 4 09:23:10 UTC 2012 root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 >Description: Build fails with: nvidia_acpi.c: In function 'nv_acpi_dsm_method': nvidia_acpi.c:166: warning: 'data_size' may be used uninitialized in this function *** [nvidia_acpi.o] Error code 1 note that this is a warning, but -Werror compiler flag is forced on (not present in make.conf). Subsequent message recommends setting MAKE_JOBS_UNSAFE=yes, but this has no effect. >How-To-Repeat: Attempt to build x11/nvidia-driver from ports. >Fix: The first usage of the data_size variable appears to be on line 203, and it is used as an "out" argument to nvidia_acpi_extract_object. That function initializes it to 0 at the beginning (line 97), so the usage is not actually unsafe. Nevertheless, initializing it to 0 at the point of declaration should have no change in behavior and suppress this warning. --- nvidia_acpi.c.orig 2013-08-27 10:11:43.149516389 -0400 +++ nvidia_acpi.c 2013-08-27 10:12:02.588515738 -0400 @@ -163,7 +163,7 @@ union acpi_object *dsm; union acpi_object dsm_input[4]; struct acpi_object_list input = { 4, dsm_input }; - uint32_t data_size; + uint32_t data_size = 0; dev = device_get_parent(nv->handle); >Release-Note: >Audit-Trail: >Unformatted: