[llvm] r294239 - [libFuzzer] make code less clever to avoid fallthrough in switch (and in turn avoid compiler warnings). NFC. Suggested by Christian Holler.
Kostya Serebryany via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 6 13:21:37 PST 2017
Author: kcc
Date: Mon Feb 6 15:21:37 2017
New Revision: 294239
URL: http://llvm.org/viewvc/llvm-project?rev=294239&view=rev
Log:
[libFuzzer] make code less clever to avoid fallthrough in switch (and in turn avoid compiler warnings). NFC. Suggested by Christian Holler.
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=294239&r1=294238&r2=294239&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/FuzzerMutate.cpp (original)
+++ llvm/trunk/lib/Fuzzer/FuzzerMutate.cpp Mon Feb 6 15:21:37 2017
@@ -437,9 +437,9 @@ size_t MutationDispatcher::Mutate_CrossO
break;
case 1:
NewSize = InsertPartOf(O.data(), O.size(), U.data(), U.size(), MaxSize);
- if (NewSize)
- break;
- // LLVM_FALLTHROUGH;
+ if (!NewSize)
+ NewSize = CopyPartOf(O.data(), O.size(), U.data(), U.size());
+ break;
case 2:
NewSize = CopyPartOf(O.data(), O.size(), U.data(), U.size());
break;
More information about the llvm-commits
mailing list