Fix serious codecheck warnings(generated by OpenHarmony CI on December 24, 2021)

Signed-off-by: wangyantian <wangyantian@huawei.com>
This commit is contained in:
wangyantian 2021-12-24 11:36:18 +08:00
parent 9915fedb2d
commit 3fe4238952
56 changed files with 2 additions and 153 deletions

View File

@ -16,8 +16,6 @@
#ifndef PANDA_ASSEMBLER_ASSEMBLY_DEBUG_H_
#define PANDA_ASSEMBLER_ASSEMBLY_DEBUG_H_
#include <cstddef>
#include <cstdint>
#include <string>
namespace panda::pandasm::debuginfo {

View File

@ -17,7 +17,6 @@
#define PANDA_ASSEMBLER_ASSEMBLY_LABEL_H_
#include <string>
#include <optional>
#include "assembly-file-location.h"
namespace panda::pandasm {

View File

@ -18,7 +18,6 @@
#include <string>
#include <vector>
#include <variant>
#include "../libpandafile/literal_data_accessor.h"

View File

@ -22,7 +22,6 @@
#include <vector>
#include "assembly-field.h"
#include "assembly-file-location.h"
#include "extensions/extensions.h"
#include "ide_helpers.h"

View File

@ -18,8 +18,6 @@
#include <string>
#include "define.h"
namespace panda::pandasm {
struct Error {

View File

@ -108,7 +108,7 @@ private:
void LexPreprocess();
void SkipSpace();
void AnalyzeLine();
Token::Type LexGetType(size_t, size_t) const;
Token::Type LexGetType(size_t beg, size_t end) const;
};
/*

View File

@ -14,8 +14,6 @@
*/
#include <gtest/gtest.h>
#include <iostream>
#include <string>
#include "mangling.h"
#include "assembly-function.h"
#include "extensions/extensions.h"
@ -44,4 +42,4 @@ TEST(mangling_tests, DeMangleFunctionName)
ASSERT_EQ(DeMangleName(name), "Asm.main");
}
} // namespace panda::test
} // namespace panda::test

View File

@ -19,7 +19,6 @@
#include <map>
#include <string>
#include <vector>
#include <utility>
namespace panda::disasm {
using LabelTable = std::map<size_t, std::string>;

View File

@ -18,8 +18,6 @@
#include "utils/logger.h"
#include "utils/pandargs.h"
#include <iostream>
static void PrintHelp(const panda::PandArgParser &pa_parser)
{
std::cerr << "Usage:" << std::endl;

View File

@ -17,13 +17,7 @@
#include "mangling.h"
#include "utils/logger.h"
#include <fstream>
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <map>
#include <utility>
#include <cctype>
namespace panda::disasm {

View File

@ -16,7 +16,6 @@
#ifndef PANDA_LIBPANDABASE_CONCEPTS_H_
#define PANDA_LIBPANDABASE_CONCEPTS_H_
#include <type_traits>
#include <iterator>
namespace panda {

View File

@ -16,8 +16,6 @@
#ifndef PANDA_LIBPANDABASE_OS_UNIX_FAILURE_RETRY_H_
#define PANDA_LIBPANDABASE_OS_UNIX_FAILURE_RETRY_H_
#include <unistd.h>
// Mac Os' libc doesn't have this macro
#ifndef TEMP_FAILURE_RETRY
#define TEMP_FAILURE_RETRY(exp) \

View File

@ -13,7 +13,6 @@
* limitations under the License.
*/
#include "time_unix.h"
#include "time.h" // NOLINTNEXTLINE(modernize-deprecated-headers, hicpp-deprecated-headers)
#include <chrono>

View File

@ -14,12 +14,6 @@
*/
#include "os/error.h"
#include <stdio.h>
#include <string.h>
#include <cerrno>
#include <array>
namespace panda::os {

View File

@ -15,12 +15,6 @@
#include "utils/leb128.h"
#include <cstdint>
#include <limits>
#include <sstream>
#include <vector>
#include <gmock/gmock.h>
#include <gtest/gtest.h>

View File

@ -19,10 +19,7 @@
#include "bit_helpers.h"
#include "bit_utils.h"
#include <cstddef>
#include <limits>
#include <type_traits>
#include <tuple>
namespace panda::leb128 {

View File

@ -14,7 +14,6 @@
*/
#include <cstring>
#include <cstdlib>
#include <string>
namespace panda::terminate {

View File

@ -15,7 +15,6 @@
#include "annotation_data_accessor.h"
#include "file_items.h"
#include "helpers.h"
namespace panda::panda_file {

View File

@ -13,11 +13,6 @@
* limitations under the License.
*/
#include "ark_version.h"
#include <cstring>
#include <cstdio>
namespace panda::panda_file {
std::string GetVersion(const std::array<uint8_t, File::VERSION_SIZE> &v)

View File

@ -13,14 +13,9 @@
* limitations under the License.
*/
#include <algorithm>
#include "bytecode_emitter.h"
#include <bytecode_instruction-inl.h>
#include <cstdarg>
#include <limits>
#include <list>
#include <macros.h>
#include <sstream>
#include <utils/bit_utils.h>
#include <utils/span.h>

View File

@ -19,8 +19,6 @@
#include "utils/leb128.h"
#include "utils/utf.h"
#include <cstring>
namespace panda::panda_file {
ClassDataAccessor::ClassDataAccessor(const File &panda_file, File::EntityId class_id)

View File

@ -21,8 +21,6 @@
#include "field_data_accessor.h"
#include "method_data_accessor.h"
#include <optional>
namespace panda::panda_file {
// NOLINTNEXTLINE(cppcoreguidelines-special-member-functions, hicpp-special-member-functions)

View File

@ -18,8 +18,6 @@
#include "code_data_accessor.h"
#include <cstddef>
namespace panda::panda_file {
template <class Callback>

View File

@ -15,8 +15,6 @@
#include "code_data_accessor.h"
#include "helpers.h"
namespace panda::panda_file {
CodeDataAccessor::CatchBlock::CatchBlock(Span<const uint8_t> data)

View File

@ -18,8 +18,6 @@
#include "file-inl.h"
#include <cstdint>
namespace panda::panda_file {
class CodeDataAccessor {

View File

@ -16,11 +16,7 @@
#include "debug_info_extractor.h"
#include "line_program_state.h"
#include "class_data_accessor-inl.h"
#include "code_data_accessor-inl.h"
#include "debug_data_accessor-inl.h"
#include "helpers.h"
#include "method_data_accessor-inl.h"
#include "proto_data_accessor-inl.h"
#include "utils/utf.h"
namespace panda::panda_file {

View File

@ -18,7 +18,6 @@
#include "file.h"
#include <cstdint>
#include <string>
#include <vector>
#include <list>

View File

@ -18,8 +18,6 @@
#include "utils/leb128.h"
#include <cstdint>
namespace panda::panda_file {
FieldDataAccessor::FieldDataAccessor(const File &panda_file, File::EntityId field_id)

View File

@ -16,15 +16,8 @@
#include "file_item_container.h"
#include "file_format_version.h"
#include "file-inl.h"
#include "helpers.h"
#include "macros.h"
#include <cstddef>
#include <iomanip>
#include <vector>
namespace panda::panda_file {
class ItemDeduper {

View File

@ -23,7 +23,6 @@
#include <memory>
#include <set>
#include <string>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>

View File

@ -14,15 +14,12 @@
*/
#include "file_items.h"
#include "helpers.h"
#include "macros.h"
#include "utils/bit_utils.h"
#include "utils/leb128.h"
#include "utils/utf.h"
#include <limits>
#include <iomanip>
#include <utility>
namespace panda::panda_file {

View File

@ -14,7 +14,6 @@
*/
#include "literal_data_accessor.h"
#include "helpers.h"
namespace panda::panda_file {

View File

@ -20,11 +20,6 @@
#include "file_items.h"
#include "modifiers.h"
#include <cstddef>
#include <cstdint>
#include <optional>
namespace panda::panda_file {
// NOLINTNEXTLINE(cppcoreguidelines-special-member-functions, hicpp-special-member-functions)

View File

@ -21,8 +21,6 @@
#include "file_items.h"
#include "proto_data_accessor.h"
#include <limits>
namespace panda::panda_file {
constexpr size_t SHORTY_ELEM_SIZE = sizeof(uint16_t);

View File

@ -990,8 +990,6 @@ TEST(LIBZIPARCHIVE, OpenUncompressedArchiveFILE)
ZipArchive object; // on stack, but this is tmp obj as we will CloseArchive this.
ZipArchiveHandle zip_archive_handler = &object;
// ZipArchiveHandle zip_archive_handler = new ZipArchive;
// Delete the test archive, so it doesn't keep growing as we run this test
remove(s_Test_archive_filename);

View File

@ -14,9 +14,6 @@
*/
#include "runtime/include/cframe.h"
#include <iomanip>
#include "runtime/include/runtime.h"
#include "runtime/include/stack_walker.h"

View File

@ -15,12 +15,6 @@
#include "runtime/include/class_linker.h"
#include <cstddef>
#include <cstdint>
#include <iostream>
#include "include/exceptions.h"
#include "include/language_context.h"
#include "os/filesystem.h"
#include "runtime/bridge/bridge.h"
#include "runtime/class_initializer.h"

View File

@ -28,8 +28,6 @@
#include "runtime/mem/pygote_space_allocator-inl.h"
#include "runtime/mem/tlab.h"
#include <functional>
namespace panda::mem {
Allocator::~Allocator() = default;

View File

@ -15,8 +15,6 @@
#include "runtime/mem/gc/card_table.h"
#include <cstring>
#include "trace/trace.h"
#include "libpandabase/mem/mem.h"
#include "libpandabase/utils/logger.h"

View File

@ -13,10 +13,6 @@
* limitations under the License.
*/
#include <algorithm>
#include <chrono>
#include <numeric>
#include "libpandabase/utils/time.h"
#include "libpandabase/utils/type_converter.h"
#include "runtime/include/runtime.h"

View File

@ -14,9 +14,6 @@
*/
#include "runtime/mem/gc/gen-gc/gen-gc.h"
#include <functional>
#include "runtime/include/hclass.h"
#include "runtime/include/coretypes/array-inl.h"
#include "runtime/include/mem/panda_smart_pointers.h"

View File

@ -15,8 +15,6 @@
#include "runtime/string_table.h"
#include <mem/gc/gc.h>
#include "runtime/include/runtime.h"
#include "runtime/mem/object_helpers.h"

View File

@ -16,16 +16,6 @@
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <algorithm>
#include <cmath>
#include <cstdint>
#include <functional>
#include <limits>
#include <memory>
#include <sstream>
#include <type_traits>
#include <vector>
#include "assembly-parser.h"
#include "libpandabase/mem/pool_manager.h"
#include "libpandabase/utils/utf.h"

View File

@ -15,12 +15,6 @@
#include <gtest/gtest.h>
#include <cmath>
#include <cstdint>
#include <limits>
#include <sstream>
#include <type_traits>
#include "runtime/interpreter/math_helpers.h"
namespace panda::interpreter::math_helpers::test {

View File

@ -13,9 +13,6 @@
* limitations under the License.
*/
#include <array>
#include <thread>
#include "gtest/gtest.h"
#include "iostream"
#include "runtime/class_linker_context.h"

View File

@ -15,10 +15,7 @@
#include "runtime/include/time_utils.h"
#include <array>
#include <chrono>
#include <iomanip>
#include <sstream>
#include "libpandabase/utils/time.h"

View File

@ -15,10 +15,7 @@
#include "runtime/timing.h"
#include <string>
#include <iostream>
#include <iomanip>
#include <stack>
#include "utils/logger.h"

View File

@ -16,8 +16,6 @@
#include "cflow_check.h"
#include "cflow_common.h"
#include "instructions_map.h"
#include "runtime/include/method-inl.h"
#include "utils/logger.h"
@ -26,9 +24,6 @@
#include "verifier_messages.h"
#include <optional>
#include <iomanip>
namespace panda::verifier {
template <class F>

View File

@ -17,7 +17,6 @@
#define PANDA_VERIFICATION_DEBUG_OPTIONS_METHOD_SELECTOR_H_
#include <regex>
#include <optional>
template <typename Info, template <typename...> class Vector, typename Regex, typename String>
class VerifierMethodSelector {

View File

@ -42,8 +42,6 @@
#include "macros.h"
#include <iostream>
namespace panda::verifier {
using FastAPIClassRW = CacheOfRuntimeThings::FastAPIClass<access::ReadWrite>;

View File

@ -26,8 +26,6 @@
#include "runtime/include/mem/panda_string.h"
#include <iostream>
#include <gtest/gtest.h>
namespace panda::verifier::test {

View File

@ -22,8 +22,6 @@
#include "type_system_kind.h"
#include <type_traits>
namespace panda::verifier {
class TypeSystem;
class TypeSet;

View File

@ -16,7 +16,6 @@
#ifndef PANDA_VERIFICATION_UTIL_FUNCTION_TRAITS_H_
#define PANDA_VERIFICATION_UTIL_FUNCTION_TRAITS_H_
#include <type_traits>
#include <tuple>
namespace panda::verifier {

View File

@ -19,7 +19,6 @@
#include "bit_vector.h"
#include <iterator>
#include <functional>
namespace panda::verifier {

View File

@ -17,7 +17,6 @@
#define PANDA_VERIFICATION_UTIL_RANGE_H_
#include <limits>
#include <type_traits>
#include <string>
#include <algorithm>
#include <iterator>

View File

@ -17,8 +17,6 @@
#include "verification/debug/parser/parser.h"
#include <strings.h>
#include <cstdlib>
#include <cstring>
namespace panda::verifier::test {