[llvm] r279321 - [libFuzzer] fix the non-debug build warnings

Kostya Serebryany via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 19 13:57:10 PDT 2016


Author: kcc
Date: Fri Aug 19 15:57:09 2016
New Revision: 279321

URL: http://llvm.org/viewvc/llvm-project?rev=279321&view=rev
Log:
[libFuzzer] fix the non-debug build warnings

Modified:
    llvm/trunk/lib/Fuzzer/FuzzerMutate.cpp

Modified: llvm/trunk/lib/Fuzzer/FuzzerMutate.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/FuzzerMutate.cpp?rev=279321&r1=279320&r2=279321&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/FuzzerMutate.cpp (original)
+++ llvm/trunk/lib/Fuzzer/FuzzerMutate.cpp Fri Aug 19 15:57:09 2016
@@ -305,6 +305,7 @@ size_t MutationDispatcher::Mutate_Change
     case 0: return ChangeBinaryInteger<uint8_t>(Data, Size, Rand);
     default: assert(0);
   }
+  return 0;
 }
 
 size_t MutationDispatcher::Mutate_CrossOver(uint8_t *Data, size_t Size,
@@ -315,7 +316,7 @@ size_t MutationDispatcher::Mutate_CrossO
   if (O.empty()) return 0;
   MutateInPlaceHere.resize(MaxSize);
   auto &U = MutateInPlaceHere;
-  size_t NewSize;
+  size_t NewSize = 0;
   switch(Rand(3)) {
     case 0:
       NewSize = CrossOver(Data, Size, O.data(), O.size(), U.data(), U.size());




More information about the llvm-commits mailing list