[LLVMbugs] [Bug 20827] New: clang 3.3 suggests initializing pthread_t to NULL
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Sep 1 12:23:28 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=20827
Bug ID: 20827
Summary: clang 3.3 suggests initializing pthread_t to NULL
Product: clang
Version: 3.3
Hardware: PC
OS: FreeBSD
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: keith at bostic.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
wtperf.c:1867:28: warning: variable 'monitor_thread' may be uninitialized when
used here [-Wconditional-uninitialized]
(t_ret = pthread_join(monitor_thread, NULL)) != 0) {
^~~~~~~~~~~~~~
wtperf.c:1744:26: note: initialize the variable 'monitor_thread' to silence
this
warning
pthread_t monitor_thread;
^
= NULL
AFAIK, it's never legal to initialize a pthread_t value to anything at all.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140901/3b032192/attachment.html>
More information about the llvm-bugs
mailing list