[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [valgrind] [Bug 329694] New: clang warns about using uninitialized variable
From:       Frerich Raabe <raabe () kde ! org>
Date:       2014-01-07 19:21:40
Message-ID: bug-329694-17878 () http ! bugs ! kde ! org/
[Download RAW message or body]

https://bugs.kde.org/show_bug.cgi?id=329694

            Bug ID: 329694
           Summary: clang warns about using uninitialized variable
    Classification: Unclassified
           Product: valgrind
           Version: 3.9.0
          Platform: Compiled Sources
                OS: OS X
            Status: UNCONFIRMED
          Severity: minor
          Priority: NOR
         Component: memcheck
          Assignee: jseward@acm.org
          Reporter: raabe@kde.org

Created attachment 84501
  --> https://bugs.kde.org/attachment.cgi?id=84501&action=edit
Patch which initializes 't' variable to zero.

Building SVN r13767 using 'Apple LLVM version 5.0 (clang-500.2.79) (based on
LLVM 3.3svn)' yields a warning when compiling memcheck/tests/pdb-realloc.c:

pdb-realloc.c:27:7: warning: variable 't' is uninitialized when used here
[-Wuninitialized]
      t += x[i];
      ^

The accompanying patch fixes this by initializing the variable to zero.

-- 
You are receiving this mail because:
You are watching all bug changes.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic