From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2068 invoked by alias); 24 May 2005 07:47:47 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 1996 invoked by uid 48); 24 May 2005 07:47:41 -0000 Date: Tue, 24 May 2005 07:48:00 -0000 From: "olh at suse dot de" To: gcc-bugs@gcc.gnu.org Message-ID: <20050524074739.21733.olh@suse.de> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug tree-optimization/21733] New: filecmp.c:252: warning: #n1# may be used uninitialized in this function X-Bugzilla-Reason: CC X-SW-Source: 2005-05/txt/msg03250.txt.bz2 List-Id: if I understand the code flow in FileCmpCmd correctly, the first loop will initialize n1 and n2 because e1 = e2 = 0, and k1 && k2 is always < BSIZE. Even if the read() will return an error, the last check to return either TCL_ERROR or TCL_OK is not undefined. This is from http://ozlabs.org/~paulus/dirdiff-2.1.tar.gz /usr/lib/gcc/powerpc64-suse-linux/4.0.1/cc1 -fpreprocessed filecmp.i -quiet -dumpbase filecmp.c -auxbase filecmp -O3 -Wall -version -fPIC -o filecmp.s GNU C version 4.0.1 20050521 (prerelease) (SUSE Linux) (powerpc64-suse-linux) compiled by GNU C version 4.0.1 20050521 (prerelease) (SUSE Linux). GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 filecmp.c: In function #FileCmpCmd#: filecmp.c:252: warning: #n2# may be used uninitialized in this function filecmp.c:252: warning: #n1# may be used uninitialized in this function -- Summary: filecmp.c:252: warning: #n1# may be used uninitialized in this function Product: gcc Version: 4.0.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: olh at suse dot de CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: powerpc-linux GCC host triplet: powerpc-linux GCC target triplet: powerpc-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21733