[LLVMbugs] [Bug 10265] New: variable 's_rand_seed' is uninitialized when used within its own initialization

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jul 4 05:31:01 PDT 2011


http://llvm.org/bugs/show_bug.cgi?id=10265

           Summary: variable 's_rand_seed' is uninitialized when used
                    within its own initialization
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: i.galic at brainsware.org
                CC: llvmbugs at cs.uiuc.edu


lib/ts/ink_auth_api.cc|30 col 39| error: variable 's_rand_seed' is
uninitialized when used within its own initialization [-Werror,-Wuninitialized]
|| static int s_rand_seed = time(NULL) + s_rand_seed;
||            ~~~~~~~~~~~                ^~~~~~~~~~~
|| 1 error generated.

This is a bogus warning, not because the code isn't terrible, but because
variables with static storage duration are zero-initialized prior to dynamic
initialization.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list