public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "olh at suse dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/21733] New: filecmp.c:252: warning: #n1# may be used uninitialized in this function
Date: Tue, 24 May 2005 07:48:00 -0000	[thread overview]
Message-ID: <20050524074739.21733.olh@suse.de> (raw)

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


             reply	other threads:[~2005-05-24  7:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-24  7:48 olh at suse dot de [this message]
2005-05-24  8:00 ` [Bug tree-optimization/21733] " olh at suse dot de
2005-05-24 14:35 ` [Bug middle-end/21733] " pinskia at gcc dot gnu dot org
2005-08-09 15:58 ` James dot Juran at baesystems dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050524074739.21733.olh@suse.de \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).