Fix -Wunreachable-code-aggressive.
Bug: chromium:1066980
Change-Id: I09b2ea41224de824a3f65ff1a838476e2413be18
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/82775
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
diff --git a/core/fpdfapi/font/cpdf_cmap.cpp b/core/fpdfapi/font/cpdf_cmap.cpp
index 6cd5d94..ea92946 100644
--- a/core/fpdfapi/font/cpdf_cmap.cpp
+++ b/core/fpdfapi/font/cpdf_cmap.cpp
@@ -371,7 +371,6 @@
return 0;
codes[char_size++] = pBytes[offset++];
}
- break;
}
}
return 0;
diff --git a/core/fpdfapi/parser/cpdf_syntax_parser.cpp b/core/fpdfapi/parser/cpdf_syntax_parser.cpp
index e46013f..9538513 100644
--- a/core/fpdfapi/parser/cpdf_syntax_parser.cpp
+++ b/core/fpdfapi/parser/cpdf_syntax_parser.cpp
@@ -904,7 +904,6 @@
match = ch == tag[0] ? 1 : 0;
}
}
- return -1;
}
bool CPDF_SyntaxParser::IsPositionRead(FX_FILESIZE pos) const {
diff --git a/core/fpdfdoc/cpdf_defaultappearance.cpp b/core/fpdfdoc/cpdf_defaultappearance.cpp
index f5b4356..35e8a0e 100644
--- a/core/fpdfdoc/cpdf_defaultappearance.cpp
+++ b/core/fpdfdoc/cpdf_defaultappearance.cpp
@@ -49,7 +49,6 @@
return true;
}
}
- return false;
}
} // namespace
diff --git a/core/fpdfdoc/cpdf_interactiveform.cpp b/core/fpdfdoc/cpdf_interactiveform.cpp
index d651b62..5f4e605 100644
--- a/core/fpdfdoc/cpdf_interactiveform.cpp
+++ b/core/fpdfdoc/cpdf_interactiveform.cpp
@@ -142,7 +142,6 @@
m++;
}
- return csTmp;
}
RetainPtr<CPDF_Font> AddStandardFont(CPDF_Document* pDocument) {
diff --git a/core/fxcodec/bmp/cfx_bmpdecompressor.cpp b/core/fxcodec/bmp/cfx_bmpdecompressor.cpp
index 7d20a55..b57e482 100644
--- a/core/fxcodec/bmp/cfx_bmpdecompressor.cpp
+++ b/core/fxcodec/bmp/cfx_bmpdecompressor.cpp
@@ -528,7 +528,6 @@
}
}
}
- return BmpDecoder::Status::kFail;
}
BmpDecoder::Status CFX_BmpDecompressor::DecodeRLE4() {
@@ -636,7 +635,6 @@
}
}
}
- return BmpDecoder::Status::kFail;
}
bool CFX_BmpDecompressor::ReadData(uint8_t* destination, uint32_t size) {
diff --git a/core/fxcodec/gif/cfx_gifcontext.cpp b/core/fxcodec/gif/cfx_gifcontext.cpp
index f845bcf..eb50065 100644
--- a/core/fxcodec/gif/cfx_gifcontext.cpp
+++ b/core/fxcodec/gif/cfx_gifcontext.cpp
@@ -151,7 +151,6 @@
}
}
}
- return GifDecoder::Status::kSuccess;
}
GifDecoder::Status CFX_GifContext::LoadFrame(int32_t frame_num) {
diff --git a/core/fxcodec/jbig2/JBig2_Context.cpp b/core/fxcodec/jbig2/JBig2_Context.cpp
index 8eab1dc..351bc86 100644
--- a/core/fxcodec/jbig2/JBig2_Context.cpp
+++ b/core/fxcodec/jbig2/JBig2_Context.cpp
@@ -353,7 +353,6 @@
case 49:
m_bInPage = false;
return JBig2_Result::kEndReached;
- break;
case 50:
m_pStream->offset(pSegment->m_dwData_length);
break;
diff --git a/xfa/fxfa/fm2js/cxfa_fmparser.cpp b/xfa/fxfa/fm2js/cxfa_fmparser.cpp
index a163684..dce6721 100644
--- a/xfa/fxfa/fm2js/cxfa_fmparser.cpp
+++ b/xfa/fxfa/fm2js/cxfa_fmparser.cpp
@@ -797,7 +797,6 @@
if (!NextToken())
return nullptr;
}
- return expr;
}
// Argument lists are zero or more comma seperated simple expressions found