[compiler-rt] r202008 - tsan: fix compiler warning
    Dmitry Vyukov 
    dvyukov at google.com
       
    Mon Feb 24 00:19:53 PST 2014
    
    
  
Author: dvyukov
Date: Mon Feb 24 02:19:53 2014
New Revision: 202008
URL: http://llvm.org/viewvc/llvm-project?rev=202008&view=rev
Log:
tsan: fix compiler warning
error: address of array 'tctx->name' will always evaluate to 'true'
Modified:
    compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_report.cc
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_report.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_report.cc?rev=202008&r1=202007&r2=202008&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_report.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_report.cc Mon Feb 24 02:19:53 2014
@@ -212,7 +212,7 @@ void ScopedReport::AddThread(const Threa
   rt->id = tctx->tid;
   rt->pid = tctx->os_id;
   rt->running = (tctx->status == ThreadStatusRunning);
-  rt->name = tctx->name ? internal_strdup(tctx->name) : 0;
+  rt->name = internal_strdup(tctx->name);
   rt->parent_tid = tctx->parent_tid;
   rt->stack = 0;
 #ifdef TSAN_GO
    
    
More information about the llvm-commits
mailing list