diff --git a/test/fuzztest/abilityappfreezemanager_fuzzer/abilityappfreezemanager_fuzzer.cpp b/test/fuzztest/abilityappfreezemanager_fuzzer/abilityappfreezemanager_fuzzer.cpp index c7fea9c5e2..b72ee8c62d 100644 --- a/test/fuzztest/abilityappfreezemanager_fuzzer/abilityappfreezemanager_fuzzer.cpp +++ b/test/fuzztest/abilityappfreezemanager_fuzzer/abilityappfreezemanager_fuzzer.cpp @@ -103,7 +103,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilityappmgrapprunningmanager_fuzzer/abilityappmgrapprunningmanager_fuzzer.cpp b/test/fuzztest/abilityappmgrapprunningmanager_fuzzer/abilityappmgrapprunningmanager_fuzzer.cpp index dd60888a26..ae07fca4b9 100644 --- a/test/fuzztest/abilityappmgrapprunningmanager_fuzzer/abilityappmgrapprunningmanager_fuzzer.cpp +++ b/test/fuzztest/abilityappmgrapprunningmanager_fuzzer/abilityappmgrapprunningmanager_fuzzer.cpp @@ -233,7 +233,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilityappmgrrenderstateobservermanager_fuzzer/abilityappmgrrenderstateobservermanager_fuzzer.cpp b/test/fuzztest/abilityappmgrrenderstateobservermanager_fuzzer/abilityappmgrrenderstateobservermanager_fuzzer.cpp index 93da0d28c8..03b6ac6d5b 100644 --- a/test/fuzztest/abilityappmgrrenderstateobservermanager_fuzzer/abilityappmgrrenderstateobservermanager_fuzzer.cpp +++ b/test/fuzztest/abilityappmgrrenderstateobservermanager_fuzzer/abilityappmgrrenderstateobservermanager_fuzzer.cpp @@ -97,7 +97,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilityautostartupclient_fuzzer/abilityautostartupclient_fuzzer.cpp b/test/fuzztest/abilityautostartupclient_fuzzer/abilityautostartupclient_fuzzer.cpp index 801053735c..888904014b 100644 --- a/test/fuzztest/abilityautostartupclient_fuzzer/abilityautostartupclient_fuzzer.cpp +++ b/test/fuzztest/abilityautostartupclient_fuzzer/abilityautostartupclient_fuzzer.cpp @@ -83,7 +83,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilityautostartupdatamanagera_fuzzer/abilityautostartupdatamanagera_fuzzer.cpp b/test/fuzztest/abilityautostartupdatamanagera_fuzzer/abilityautostartupdatamanagera_fuzzer.cpp index 80652ae91d..a003af87b1 100755 --- a/test/fuzztest/abilityautostartupdatamanagera_fuzzer/abilityautostartupdatamanagera_fuzzer.cpp +++ b/test/fuzztest/abilityautostartupdatamanagera_fuzzer/abilityautostartupdatamanagera_fuzzer.cpp @@ -160,7 +160,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilityautostartupdatamanagerb_fuzzer/abilityautostartupdatamanagerb_fuzzer.cpp b/test/fuzztest/abilityautostartupdatamanagerb_fuzzer/abilityautostartupdatamanagerb_fuzzer.cpp index 286cd6c0b4..d59ec4339f 100755 --- a/test/fuzztest/abilityautostartupdatamanagerb_fuzzer/abilityautostartupdatamanagerb_fuzzer.cpp +++ b/test/fuzztest/abilityautostartupdatamanagerb_fuzzer/abilityautostartupdatamanagerb_fuzzer.cpp @@ -136,7 +136,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilityautostartupservicea_fuzzer/abilityautostartupservicea_fuzzer.cpp b/test/fuzztest/abilityautostartupservicea_fuzzer/abilityautostartupservicea_fuzzer.cpp index 5f55fc19e0..cdc6e7b35e 100755 --- a/test/fuzztest/abilityautostartupservicea_fuzzer/abilityautostartupservicea_fuzzer.cpp +++ b/test/fuzztest/abilityautostartupservicea_fuzzer/abilityautostartupservicea_fuzzer.cpp @@ -116,7 +116,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilityautostartupserviceb_fuzzer/abilityautostartupserviceb_fuzzer.cpp b/test/fuzztest/abilityautostartupserviceb_fuzzer/abilityautostartupserviceb_fuzzer.cpp index 879cabbd24..ac92243590 100755 --- a/test/fuzztest/abilityautostartupserviceb_fuzzer/abilityautostartupserviceb_fuzzer.cpp +++ b/test/fuzztest/abilityautostartupserviceb_fuzzer/abilityautostartupserviceb_fuzzer.cpp @@ -130,7 +130,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilitybackgroundconnection_fuzzer/abilitybackgroundconnection_fuzzer.cpp b/test/fuzztest/abilitybackgroundconnection_fuzzer/abilitybackgroundconnection_fuzzer.cpp index 27f63794c0..dd6e587a3f 100644 --- a/test/fuzztest/abilitybackgroundconnection_fuzzer/abilitybackgroundconnection_fuzzer.cpp +++ b/test/fuzztest/abilitybackgroundconnection_fuzzer/abilitybackgroundconnection_fuzzer.cpp @@ -70,7 +70,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilitycachemanagera_fuzzer/abilitycachemanagera_fuzzer.cpp b/test/fuzztest/abilitycachemanagera_fuzzer/abilitycachemanagera_fuzzer.cpp index c2d08f1522..a03e935960 100755 --- a/test/fuzztest/abilitycachemanagera_fuzzer/abilitycachemanagera_fuzzer.cpp +++ b/test/fuzztest/abilitycachemanagera_fuzzer/abilitycachemanagera_fuzzer.cpp @@ -137,7 +137,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilitychildprocessrecord_fuzzer/abilitychildprocessrecord_fuzzer.cpp b/test/fuzztest/abilitychildprocessrecord_fuzzer/abilitychildprocessrecord_fuzzer.cpp index a6c8153577..c971d31049 100644 --- a/test/fuzztest/abilitychildprocessrecord_fuzzer/abilitychildprocessrecord_fuzzer.cpp +++ b/test/fuzztest/abilitychildprocessrecord_fuzzer/abilitychildprocessrecord_fuzzer.cpp @@ -51,8 +51,8 @@ bool DoSomethingInterestingWithMyAPI(const char* data, size_t size) bool flag = *data % ENABLE; ChildProcessRecord::CreateNativeChildProcessRecord(hostPid, stringParam, hostRecord, mP, cd, flag); std::shared_ptr appInfo = std::make_shared(); - int32_t RECORD_ID = static_cast(GetU32Data(data)); - auto appRecord = std::make_shared(appInfo, RECORD_ID, stringParam); + int32_t recordId = static_cast(GetU32Data(data)); + auto appRecord = std::make_shared(appInfo, recordId, stringParam); auto childRecord = std::make_shared(hostPid, request, appRecord); childRecord->SetPid(hostPid); childRecord->GetPid(); diff --git a/test/fuzztest/abilityconnectionstub_fuzzer/abilityconnectionstub_fuzzer.cpp b/test/fuzztest/abilityconnectionstub_fuzzer/abilityconnectionstub_fuzzer.cpp index fc9245accb..46757cebc5 100755 --- a/test/fuzztest/abilityconnectionstub_fuzzer/abilityconnectionstub_fuzzer.cpp +++ b/test/fuzztest/abilityconnectionstub_fuzzer/abilityconnectionstub_fuzzer.cpp @@ -89,7 +89,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilityconnectmanager_fuzzer/abilityconnectmanager_fuzzer.cpp b/test/fuzztest/abilityconnectmanager_fuzzer/abilityconnectmanager_fuzzer.cpp index fe586a3e1a..30bcd90682 100755 --- a/test/fuzztest/abilityconnectmanager_fuzzer/abilityconnectmanager_fuzzer.cpp +++ b/test/fuzztest/abilityconnectmanager_fuzzer/abilityconnectmanager_fuzzer.cpp @@ -177,7 +177,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilitycontext_fuzzer/abilitycontext_fuzzer.cpp b/test/fuzztest/abilitycontext_fuzzer/abilitycontext_fuzzer.cpp index 6c05bb99d6..34c9e4a0ff 100644 --- a/test/fuzztest/abilitycontext_fuzzer/abilitycontext_fuzzer.cpp +++ b/test/fuzztest/abilitycontext_fuzzer/abilitycontext_fuzzer.cpp @@ -142,7 +142,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilitydebugdeal_fuzzer/abilitydebugdeal_fuzzer.cpp b/test/fuzztest/abilitydebugdeal_fuzzer/abilitydebugdeal_fuzzer.cpp index fab364681b..fb468f80f9 100644 --- a/test/fuzztest/abilitydebugdeal_fuzzer/abilitydebugdeal_fuzzer.cpp +++ b/test/fuzztest/abilitydebugdeal_fuzzer/abilitydebugdeal_fuzzer.cpp @@ -106,7 +106,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilitydebugresponseproxy_fuzzer/abilitydebugresponseproxy_fuzzer.cpp b/test/fuzztest/abilitydebugresponseproxy_fuzzer/abilitydebugresponseproxy_fuzzer.cpp index a4de78c19f..7840d93e67 100755 --- a/test/fuzztest/abilitydebugresponseproxy_fuzzer/abilitydebugresponseproxy_fuzzer.cpp +++ b/test/fuzztest/abilitydebugresponseproxy_fuzzer/abilitydebugresponseproxy_fuzzer.cpp @@ -103,7 +103,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilityeventhandler_fuzzer/abilityeventhandler_fuzzer.cpp b/test/fuzztest/abilityeventhandler_fuzzer/abilityeventhandler_fuzzer.cpp index 25587e8dac..5aa50d5c53 100755 --- a/test/fuzztest/abilityeventhandler_fuzzer/abilityeventhandler_fuzzer.cpp +++ b/test/fuzztest/abilityeventhandler_fuzzer/abilityeventhandler_fuzzer.cpp @@ -191,7 +191,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilityfirstframestateobservermanager_fuzzer/abilityfirstframestateobservermanager_fuzzer.cpp b/test/fuzztest/abilityfirstframestateobservermanager_fuzzer/abilityfirstframestateobservermanager_fuzzer.cpp index 72b919b2fa..6c91cf642d 100644 --- a/test/fuzztest/abilityfirstframestateobservermanager_fuzzer/abilityfirstframestateobservermanager_fuzzer.cpp +++ b/test/fuzztest/abilityfirstframestateobservermanager_fuzzer/abilityfirstframestateobservermanager_fuzzer.cpp @@ -82,7 +82,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) if (size < OHOS::U32_AT_SIZE) { return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilityframeworkscjenvironment_fuzzer/abilityframeworkscjenvironment_fuzzer.cpp b/test/fuzztest/abilityframeworkscjenvironment_fuzzer/abilityframeworkscjenvironment_fuzzer.cpp index 7566ee9404..dd89f72284 100644 --- a/test/fuzztest/abilityframeworkscjenvironment_fuzzer/abilityframeworkscjenvironment_fuzzer.cpp +++ b/test/fuzztest/abilityframeworkscjenvironment_fuzzer/abilityframeworkscjenvironment_fuzzer.cpp @@ -83,7 +83,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilityframeworksnativejsworker_fuzzer/abilityframeworksnativejsworker_fuzzer.cpp b/test/fuzztest/abilityframeworksnativejsworker_fuzzer/abilityframeworksnativejsworker_fuzzer.cpp index 836313e321..5c6bc409fc 100644 --- a/test/fuzztest/abilityframeworksnativejsworker_fuzzer/abilityframeworksnativejsworker_fuzzer.cpp +++ b/test/fuzztest/abilityframeworksnativejsworker_fuzzer/abilityframeworksnativejsworker_fuzzer.cpp @@ -109,7 +109,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilityframeworksnativeohosjsenvlogger_fuzzer/abilityframeworksnativeohosjsenvlogger_fuzzer.cpp b/test/fuzztest/abilityframeworksnativeohosjsenvlogger_fuzzer/abilityframeworksnativeohosjsenvlogger_fuzzer.cpp index 507fc6842f..7cba167c4c 100644 --- a/test/fuzztest/abilityframeworksnativeohosjsenvlogger_fuzzer/abilityframeworksnativeohosjsenvlogger_fuzzer.cpp +++ b/test/fuzztest/abilityframeworksnativeohosjsenvlogger_fuzzer/abilityframeworksnativeohosjsenvlogger_fuzzer.cpp @@ -68,7 +68,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilityinterfacesappmanageramsmgrstub_fuzzer/abilityinterfacesappmanageramsmgrstub_fuzzer.cpp b/test/fuzztest/abilityinterfacesappmanageramsmgrstub_fuzzer/abilityinterfacesappmanageramsmgrstub_fuzzer.cpp index 05edbd463b..8accecfbdf 100644 --- a/test/fuzztest/abilityinterfacesappmanageramsmgrstub_fuzzer/abilityinterfacesappmanageramsmgrstub_fuzzer.cpp +++ b/test/fuzztest/abilityinterfacesappmanageramsmgrstub_fuzzer/abilityinterfacesappmanageramsmgrstub_fuzzer.cpp @@ -95,7 +95,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilityinterfacesappmgrabilitydebugresponseproxy_fuzzer/abilityinterfacesappmgrabilitydebugresponseproxy_fuzzer.cpp b/test/fuzztest/abilityinterfacesappmgrabilitydebugresponseproxy_fuzzer/abilityinterfacesappmgrabilitydebugresponseproxy_fuzzer.cpp index 5de6344e33..b09f529b4c 100644 --- a/test/fuzztest/abilityinterfacesappmgrabilitydebugresponseproxy_fuzzer/abilityinterfacesappmgrabilitydebugresponseproxy_fuzzer.cpp +++ b/test/fuzztest/abilityinterfacesappmgrabilitydebugresponseproxy_fuzzer/abilityinterfacesappmgrabilitydebugresponseproxy_fuzzer.cpp @@ -102,7 +102,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilityinterfacesappmgrappdebuglistenerproxy_fuzzer/abilityinterfacesappmgrappdebuglistenerproxy_fuzzer.cpp b/test/fuzztest/abilityinterfacesappmgrappdebuglistenerproxy_fuzzer/abilityinterfacesappmgrappdebuglistenerproxy_fuzzer.cpp index 64ceb3cd8b..bb28bb48cd 100644 --- a/test/fuzztest/abilityinterfacesappmgrappdebuglistenerproxy_fuzzer/abilityinterfacesappmgrappdebuglistenerproxy_fuzzer.cpp +++ b/test/fuzztest/abilityinterfacesappmgrappdebuglistenerproxy_fuzzer/abilityinterfacesappmgrappdebuglistenerproxy_fuzzer.cpp @@ -98,7 +98,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilityinterfacesappmgrappdebuglistenerstub_fuzzer/abilityinterfacesappmgrappdebuglistenerstub_fuzzer.cpp b/test/fuzztest/abilityinterfacesappmgrappdebuglistenerstub_fuzzer/abilityinterfacesappmgrappdebuglistenerstub_fuzzer.cpp index 7a6e74b039..2b94e21e8d 100644 --- a/test/fuzztest/abilityinterfacesappmgrappdebuglistenerstub_fuzzer/abilityinterfacesappmgrappdebuglistenerstub_fuzzer.cpp +++ b/test/fuzztest/abilityinterfacesappmgrappdebuglistenerstub_fuzzer/abilityinterfacesappmgrappdebuglistenerstub_fuzzer.cpp @@ -104,7 +104,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilityinterfacesappmgrappforegroundstateobserverstub_fuzzer/abilityinterfacesappmgrappforegroundstateobserverstub_fuzzer.cpp b/test/fuzztest/abilityinterfacesappmgrappforegroundstateobserverstub_fuzzer/abilityinterfacesappmgrappforegroundstateobserverstub_fuzzer.cpp index a9bdf39fc6..049e3e8cc6 100644 --- a/test/fuzztest/abilityinterfacesappmgrappforegroundstateobserverstub_fuzzer/abilityinterfacesappmgrappforegroundstateobserverstub_fuzzer.cpp +++ b/test/fuzztest/abilityinterfacesappmgrappforegroundstateobserverstub_fuzzer/abilityinterfacesappmgrappforegroundstateobserverstub_fuzzer.cpp @@ -109,7 +109,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilityinterfacesappmgrchildschedulerstub_fuzzer/abilityinterfacesappmgrchildschedulerstub_fuzzer.cpp b/test/fuzztest/abilityinterfacesappmgrchildschedulerstub_fuzzer/abilityinterfacesappmgrchildschedulerstub_fuzzer.cpp index 1813ffc089..eb204415cd 100644 --- a/test/fuzztest/abilityinterfacesappmgrchildschedulerstub_fuzzer/abilityinterfacesappmgrchildschedulerstub_fuzzer.cpp +++ b/test/fuzztest/abilityinterfacesappmgrchildschedulerstub_fuzzer/abilityinterfacesappmgrchildschedulerstub_fuzzer.cpp @@ -108,7 +108,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilityinterfacesappmgrnativechildnotifyproxy_fuzzer/abilityinterfacesappmgrnativechildnotifyproxy_fuzzer.cpp b/test/fuzztest/abilityinterfacesappmgrnativechildnotifyproxy_fuzzer/abilityinterfacesappmgrnativechildnotifyproxy_fuzzer.cpp index 6debe23f77..0a571fa70c 100644 --- a/test/fuzztest/abilityinterfacesappmgrnativechildnotifyproxy_fuzzer/abilityinterfacesappmgrnativechildnotifyproxy_fuzzer.cpp +++ b/test/fuzztest/abilityinterfacesappmgrnativechildnotifyproxy_fuzzer/abilityinterfacesappmgrnativechildnotifyproxy_fuzzer.cpp @@ -105,7 +105,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilityinterfacesappmgrnativechildnotifystub_fuzzer/abilityinterfacesappmgrnativechildnotifystub_fuzzer.cpp b/test/fuzztest/abilityinterfacesappmgrnativechildnotifystub_fuzzer/abilityinterfacesappmgrnativechildnotifystub_fuzzer.cpp index 9183e951a9..118610b59c 100644 --- a/test/fuzztest/abilityinterfacesappmgrnativechildnotifystub_fuzzer/abilityinterfacesappmgrnativechildnotifystub_fuzzer.cpp +++ b/test/fuzztest/abilityinterfacesappmgrnativechildnotifystub_fuzzer/abilityinterfacesappmgrnativechildnotifystub_fuzzer.cpp @@ -107,7 +107,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilityinterfacesappmgrrenderstateobserverstub_fuzzer/abilityinterfacesappmgrrenderstateobserverstub_fuzzer.cpp b/test/fuzztest/abilityinterfacesappmgrrenderstateobserverstub_fuzzer/abilityinterfacesappmgrrenderstateobserverstub_fuzzer.cpp index 16e6386323..07d3000d8e 100644 --- a/test/fuzztest/abilityinterfacesappmgrrenderstateobserverstub_fuzzer/abilityinterfacesappmgrrenderstateobserverstub_fuzzer.cpp +++ b/test/fuzztest/abilityinterfacesappmgrrenderstateobserverstub_fuzzer/abilityinterfacesappmgrrenderstateobserverstub_fuzzer.cpp @@ -100,7 +100,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilitymanagerservicea_fuzzer/abilitymanagerservicea_fuzzer.cpp b/test/fuzztest/abilitymanagerservicea_fuzzer/abilitymanagerservicea_fuzzer.cpp index b6cd606b01..1818dd04ea 100755 --- a/test/fuzztest/abilitymanagerservicea_fuzzer/abilitymanagerservicea_fuzzer.cpp +++ b/test/fuzztest/abilitymanagerservicea_fuzzer/abilitymanagerservicea_fuzzer.cpp @@ -101,7 +101,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilitymanagerserviceb_fuzzer/abilitymanagerserviceb_fuzzer.cpp b/test/fuzztest/abilitymanagerserviceb_fuzzer/abilitymanagerserviceb_fuzzer.cpp index 836ef011db..02c147067e 100755 --- a/test/fuzztest/abilitymanagerserviceb_fuzzer/abilitymanagerserviceb_fuzzer.cpp +++ b/test/fuzztest/abilitymanagerserviceb_fuzzer/abilitymanagerserviceb_fuzzer.cpp @@ -77,7 +77,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilitymanagerservicec_fuzzer/abilitymanagerservicec_fuzzer.cpp b/test/fuzztest/abilitymanagerservicec_fuzzer/abilitymanagerservicec_fuzzer.cpp index 6aa83366a9..ea15638924 100755 --- a/test/fuzztest/abilitymanagerservicec_fuzzer/abilitymanagerservicec_fuzzer.cpp +++ b/test/fuzztest/abilitymanagerservicec_fuzzer/abilitymanagerservicec_fuzzer.cpp @@ -112,7 +112,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilitymanagerserviced_fuzzer/abilitymanagerserviced_fuzzer.cpp b/test/fuzztest/abilitymanagerserviced_fuzzer/abilitymanagerserviced_fuzzer.cpp index 79cbd994b8..9d2b5fe1f6 100755 --- a/test/fuzztest/abilitymanagerserviced_fuzzer/abilitymanagerserviced_fuzzer.cpp +++ b/test/fuzztest/abilitymanagerserviced_fuzzer/abilitymanagerserviced_fuzzer.cpp @@ -95,7 +95,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilitymanagerservicee_fuzzer/abilitymanagerservicee_fuzzer.cpp b/test/fuzztest/abilitymanagerservicee_fuzzer/abilitymanagerservicee_fuzzer.cpp index d69539f481..47f3531b4b 100755 --- a/test/fuzztest/abilitymanagerservicee_fuzzer/abilitymanagerservicee_fuzzer.cpp +++ b/test/fuzztest/abilitymanagerservicee_fuzzer/abilitymanagerservicee_fuzzer.cpp @@ -102,7 +102,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilitymanagerserviceeighth_fuzzer/abilitymanagerserviceeighth_fuzzer.cpp b/test/fuzztest/abilitymanagerserviceeighth_fuzzer/abilitymanagerserviceeighth_fuzzer.cpp index 9abcdea5a8..8f259f9693 100755 --- a/test/fuzztest/abilitymanagerserviceeighth_fuzzer/abilitymanagerserviceeighth_fuzzer.cpp +++ b/test/fuzztest/abilitymanagerserviceeighth_fuzzer/abilitymanagerserviceeighth_fuzzer.cpp @@ -83,7 +83,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char *)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilitymanagerservicef_fuzzer/abilitymanagerservicef_fuzzer.cpp b/test/fuzztest/abilitymanagerservicef_fuzzer/abilitymanagerservicef_fuzzer.cpp index f680876e19..fbe526512f 100755 --- a/test/fuzztest/abilitymanagerservicef_fuzzer/abilitymanagerservicef_fuzzer.cpp +++ b/test/fuzztest/abilitymanagerservicef_fuzzer/abilitymanagerservicef_fuzzer.cpp @@ -110,7 +110,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilitymanagerservicefifth_fuzzer/abilitymanagerservicefifth_fuzzer.cpp b/test/fuzztest/abilitymanagerservicefifth_fuzzer/abilitymanagerservicefifth_fuzzer.cpp index e72d4a048c..a43b9a913c 100755 --- a/test/fuzztest/abilitymanagerservicefifth_fuzzer/abilitymanagerservicefifth_fuzzer.cpp +++ b/test/fuzztest/abilitymanagerservicefifth_fuzzer/abilitymanagerservicefifth_fuzzer.cpp @@ -114,7 +114,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilitymanagerservicefirst_fuzzer/abilitymanagerservicefirst_fuzzer.cpp b/test/fuzztest/abilitymanagerservicefirst_fuzzer/abilitymanagerservicefirst_fuzzer.cpp index 1923ade199..f2b0809f2f 100755 --- a/test/fuzztest/abilitymanagerservicefirst_fuzzer/abilitymanagerservicefirst_fuzzer.cpp +++ b/test/fuzztest/abilitymanagerservicefirst_fuzzer/abilitymanagerservicefirst_fuzzer.cpp @@ -195,7 +195,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilitymanagerservicefourth_fuzzer/abilitymanagerservicefourth_fuzzer.cpp b/test/fuzztest/abilitymanagerservicefourth_fuzzer/abilitymanagerservicefourth_fuzzer.cpp index 38aa64a990..6211742e6e 100755 --- a/test/fuzztest/abilitymanagerservicefourth_fuzzer/abilitymanagerservicefourth_fuzzer.cpp +++ b/test/fuzztest/abilitymanagerservicefourth_fuzzer/abilitymanagerservicefourth_fuzzer.cpp @@ -91,7 +91,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilitymanagerserviceg_fuzzer/abilitymanagerserviceg_fuzzer.cpp b/test/fuzztest/abilitymanagerserviceg_fuzzer/abilitymanagerserviceg_fuzzer.cpp index f37b63b232..81584102d7 100755 --- a/test/fuzztest/abilitymanagerserviceg_fuzzer/abilitymanagerserviceg_fuzzer.cpp +++ b/test/fuzztest/abilitymanagerserviceg_fuzzer/abilitymanagerserviceg_fuzzer.cpp @@ -106,7 +106,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilitymanagerserviceh_fuzzer/abilitymanagerserviceh_fuzzer.cpp b/test/fuzztest/abilitymanagerserviceh_fuzzer/abilitymanagerserviceh_fuzzer.cpp index 333c5c27bd..01da65e514 100755 --- a/test/fuzztest/abilitymanagerserviceh_fuzzer/abilitymanagerserviceh_fuzzer.cpp +++ b/test/fuzztest/abilitymanagerserviceh_fuzzer/abilitymanagerserviceh_fuzzer.cpp @@ -89,7 +89,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilitymanagerserviceninth_fuzzer/abilitymanagerserviceninth_fuzzer.cpp b/test/fuzztest/abilitymanagerserviceninth_fuzzer/abilitymanagerserviceninth_fuzzer.cpp index e4f59d453a..67c033d021 100755 --- a/test/fuzztest/abilitymanagerserviceninth_fuzzer/abilitymanagerserviceninth_fuzzer.cpp +++ b/test/fuzztest/abilitymanagerserviceninth_fuzzer/abilitymanagerserviceninth_fuzzer.cpp @@ -79,7 +79,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilitymanagerservicesecond_fuzzer/abilitymanagerservicesecond_fuzzer.cpp b/test/fuzztest/abilitymanagerservicesecond_fuzzer/abilitymanagerservicesecond_fuzzer.cpp index 9769cab010..9fb5ac6eac 100755 --- a/test/fuzztest/abilitymanagerservicesecond_fuzzer/abilitymanagerservicesecond_fuzzer.cpp +++ b/test/fuzztest/abilitymanagerservicesecond_fuzzer/abilitymanagerservicesecond_fuzzer.cpp @@ -155,7 +155,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilitymanagerserviceseventh_fuzzer/abilitymanagerserviceseventh_fuzzer.cpp b/test/fuzztest/abilitymanagerserviceseventh_fuzzer/abilitymanagerserviceseventh_fuzzer.cpp index 7dcd91cb0a..20a55776b7 100755 --- a/test/fuzztest/abilitymanagerserviceseventh_fuzzer/abilitymanagerserviceseventh_fuzzer.cpp +++ b/test/fuzztest/abilitymanagerserviceseventh_fuzzer/abilitymanagerserviceseventh_fuzzer.cpp @@ -125,7 +125,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilitymanagerservicesixth_fuzzer/abilitymanagerservicesixth_fuzzer.cpp b/test/fuzztest/abilitymanagerservicesixth_fuzzer/abilitymanagerservicesixth_fuzzer.cpp index 0ef00f3c45..a47343fac8 100755 --- a/test/fuzztest/abilitymanagerservicesixth_fuzzer/abilitymanagerservicesixth_fuzzer.cpp +++ b/test/fuzztest/abilitymanagerservicesixth_fuzzer/abilitymanagerservicesixth_fuzzer.cpp @@ -107,7 +107,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilitymanagerservicetenth_fuzzer/abilitymanagerservicetenth_fuzzer.cpp b/test/fuzztest/abilitymanagerservicetenth_fuzzer/abilitymanagerservicetenth_fuzzer.cpp index 08e81e2b6a..9f51383f47 100755 --- a/test/fuzztest/abilitymanagerservicetenth_fuzzer/abilitymanagerservicetenth_fuzzer.cpp +++ b/test/fuzztest/abilitymanagerservicetenth_fuzzer/abilitymanagerservicetenth_fuzzer.cpp @@ -95,7 +95,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilitymanagerservicethird_fuzzer/abilitymanagerservicethird_fuzzer.cpp b/test/fuzztest/abilitymanagerservicethird_fuzzer/abilitymanagerservicethird_fuzzer.cpp index f88c07b1a9..b01b9e9f9e 100755 --- a/test/fuzztest/abilitymanagerservicethird_fuzzer/abilitymanagerservicethird_fuzzer.cpp +++ b/test/fuzztest/abilitymanagerservicethird_fuzzer/abilitymanagerservicethird_fuzzer.cpp @@ -101,7 +101,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilitymgrabilitymanagerstub_fuzzer/abilitymgrabilitymanagerstub_fuzzer.cpp b/test/fuzztest/abilitymgrabilitymanagerstub_fuzzer/abilitymgrabilitymanagerstub_fuzzer.cpp index 976bb3cb9b..07681d7f73 100644 --- a/test/fuzztest/abilitymgrabilitymanagerstub_fuzzer/abilitymgrabilitymanagerstub_fuzzer.cpp +++ b/test/fuzztest/abilitymgrabilitymanagerstub_fuzzer/abilitymgrabilitymanagerstub_fuzzer.cpp @@ -99,7 +99,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilitymgrappexitreasonhelper_fuzzer/abilitymgrappexitreasonhelper_fuzzer.cpp b/test/fuzztest/abilitymgrappexitreasonhelper_fuzzer/abilitymgrappexitreasonhelper_fuzzer.cpp index cbb7e51e2c..e0a29dc6c3 100644 --- a/test/fuzztest/abilitymgrappexitreasonhelper_fuzzer/abilitymgrappexitreasonhelper_fuzzer.cpp +++ b/test/fuzztest/abilitymgrappexitreasonhelper_fuzzer/abilitymgrappexitreasonhelper_fuzzer.cpp @@ -104,7 +104,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilitymgrcontrolinterceptor_fuzzer/abilitymgrcontrolinterceptor_fuzzer.cpp b/test/fuzztest/abilitymgrcontrolinterceptor_fuzzer/abilitymgrcontrolinterceptor_fuzzer.cpp index 1c7a2a41a8..785018d2bb 100644 --- a/test/fuzztest/abilitymgrcontrolinterceptor_fuzzer/abilitymgrcontrolinterceptor_fuzzer.cpp +++ b/test/fuzztest/abilitymgrcontrolinterceptor_fuzzer/abilitymgrcontrolinterceptor_fuzzer.cpp @@ -94,7 +94,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilitymgrdisposedruleinterceptor_fuzzer/abilitymgrdisposedruleinterceptor_fuzzer.cpp b/test/fuzztest/abilitymgrdisposedruleinterceptor_fuzzer/abilitymgrdisposedruleinterceptor_fuzzer.cpp index 4ace31bd87..75331b72dc 100644 --- a/test/fuzztest/abilitymgrdisposedruleinterceptor_fuzzer/abilitymgrdisposedruleinterceptor_fuzzer.cpp +++ b/test/fuzztest/abilitymgrdisposedruleinterceptor_fuzzer/abilitymgrdisposedruleinterceptor_fuzzer.cpp @@ -105,7 +105,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilitymgrecologicalruleinterceptor_fuzzer/abilitymgrecologicalruleinterceptor_fuzzer.cpp b/test/fuzztest/abilitymgrecologicalruleinterceptor_fuzzer/abilitymgrecologicalruleinterceptor_fuzzer.cpp index 855384b4ad..a2e7813aaf 100644 --- a/test/fuzztest/abilitymgrecologicalruleinterceptor_fuzzer/abilitymgrecologicalruleinterceptor_fuzzer.cpp +++ b/test/fuzztest/abilitymgrecologicalruleinterceptor_fuzzer/abilitymgrecologicalruleinterceptor_fuzzer.cpp @@ -103,7 +103,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilitymgrextensionrecord_fuzzer/abilitymgrextensionrecord_fuzzer.cpp b/test/fuzztest/abilitymgrextensionrecord_fuzzer/abilitymgrextensionrecord_fuzzer.cpp index 1482f2b0e6..f3d0e927af 100644 --- a/test/fuzztest/abilitymgrextensionrecord_fuzzer/abilitymgrextensionrecord_fuzzer.cpp +++ b/test/fuzztest/abilitymgrextensionrecord_fuzzer/abilitymgrextensionrecord_fuzzer.cpp @@ -95,7 +95,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilitymgrinsightintentexecutemanager_fuzzer/abilitymgrinsightintentexecutemanager_fuzzer.cpp b/test/fuzztest/abilitymgrinsightintentexecutemanager_fuzzer/abilitymgrinsightintentexecutemanager_fuzzer.cpp index 76d8b14f35..8cc2de4912 100644 --- a/test/fuzztest/abilitymgrinsightintentexecutemanager_fuzzer/abilitymgrinsightintentexecutemanager_fuzzer.cpp +++ b/test/fuzztest/abilitymgrinsightintentexecutemanager_fuzzer/abilitymgrinsightintentexecutemanager_fuzzer.cpp @@ -120,7 +120,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilitymgrinsightintentutils_fuzzer/abilitymgrinsightintentutils_fuzzer.cpp b/test/fuzztest/abilitymgrinsightintentutils_fuzzer/abilitymgrinsightintentutils_fuzzer.cpp index bedd054d68..aec21c9305 100644 --- a/test/fuzztest/abilitymgrinsightintentutils_fuzzer/abilitymgrinsightintentutils_fuzzer.cpp +++ b/test/fuzztest/abilitymgrinsightintentutils_fuzzer/abilitymgrinsightintentutils_fuzzer.cpp @@ -90,7 +90,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilitymgrinterceptorexecuter_fuzzer/abilitymgrinterceptorexecuter_fuzzer.cpp b/test/fuzztest/abilitymgrinterceptorexecuter_fuzzer/abilitymgrinterceptorexecuter_fuzzer.cpp index d6dc73787a..19d99a3587 100644 --- a/test/fuzztest/abilitymgrinterceptorexecuter_fuzzer/abilitymgrinterceptorexecuter_fuzzer.cpp +++ b/test/fuzztest/abilitymgrinterceptorexecuter_fuzzer/abilitymgrinterceptorexecuter_fuzzer.cpp @@ -97,7 +97,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilitymgrrdbparserutil_fuzzer/abilitymgrrdbparserutil_fuzzer.cpp b/test/fuzztest/abilitymgrrdbparserutil_fuzzer/abilitymgrrdbparserutil_fuzzer.cpp index dc32bf857f..feb8695457 100644 --- a/test/fuzztest/abilitymgrrdbparserutil_fuzzer/abilitymgrrdbparserutil_fuzzer.cpp +++ b/test/fuzztest/abilitymgrrdbparserutil_fuzzer/abilitymgrrdbparserutil_fuzzer.cpp @@ -92,7 +92,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilitymgrrest_fuzzer/abilitymgrrest_fuzzer.cpp b/test/fuzztest/abilitymgrrest_fuzzer/abilitymgrrest_fuzzer.cpp index db7ff7aa49..c4493e5bdc 100755 --- a/test/fuzztest/abilitymgrrest_fuzzer/abilitymgrrest_fuzzer.cpp +++ b/test/fuzztest/abilitymgrrest_fuzzer/abilitymgrrest_fuzzer.cpp @@ -85,7 +85,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilityrunningrecord_fuzzer/abilityrunningrecord_fuzzer.cpp b/test/fuzztest/abilityrunningrecord_fuzzer/abilityrunningrecord_fuzzer.cpp index 07d4f96851..f8dac35f8c 100644 --- a/test/fuzztest/abilityrunningrecord_fuzzer/abilityrunningrecord_fuzzer.cpp +++ b/test/fuzztest/abilityrunningrecord_fuzzer/abilityrunningrecord_fuzzer.cpp @@ -106,7 +106,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilityschedulerstub_fuzzer/abilityschedulerstub_fuzzer.cpp b/test/fuzztest/abilityschedulerstub_fuzzer/abilityschedulerstub_fuzzer.cpp index 2f96c07aaa..7b2c65ce4e 100755 --- a/test/fuzztest/abilityschedulerstub_fuzzer/abilityschedulerstub_fuzzer.cpp +++ b/test/fuzztest/abilityschedulerstub_fuzzer/abilityschedulerstub_fuzzer.cpp @@ -196,7 +196,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/abilitytransitiondone_fuzzer/abilitytransitiondone_fuzzer.cpp b/test/fuzztest/abilitytransitiondone_fuzzer/abilitytransitiondone_fuzzer.cpp index 519361c50a..00d3f067ad 100644 --- a/test/fuzztest/abilitytransitiondone_fuzzer/abilitytransitiondone_fuzzer.cpp +++ b/test/fuzztest/abilitytransitiondone_fuzzer/abilitytransitiondone_fuzzer.cpp @@ -123,7 +123,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/acquiredataability_fuzzer/acquiredataability_fuzzer.cpp b/test/fuzztest/acquiredataability_fuzzer/acquiredataability_fuzzer.cpp index 387a50a218..bd40d79365 100644 --- a/test/fuzztest/acquiredataability_fuzzer/acquiredataability_fuzzer.cpp +++ b/test/fuzztest/acquiredataability_fuzzer/acquiredataability_fuzzer.cpp @@ -95,7 +95,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/addabilitystagedone_fuzzer/addabilitystagedone_fuzzer.cpp b/test/fuzztest/addabilitystagedone_fuzzer/addabilitystagedone_fuzzer.cpp index d5d13cb4f2..b9cc9a60a1 100755 --- a/test/fuzztest/addabilitystagedone_fuzzer/addabilitystagedone_fuzzer.cpp +++ b/test/fuzztest/addabilitystagedone_fuzzer/addabilitystagedone_fuzzer.cpp @@ -71,7 +71,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/amsmgrscheduler_fuzzer/amsmgrscheduler_fuzzer.cpp b/test/fuzztest/amsmgrscheduler_fuzzer/amsmgrscheduler_fuzzer.cpp index e6ac16c8b4..21d9b3188a 100755 --- a/test/fuzztest/amsmgrscheduler_fuzzer/amsmgrscheduler_fuzzer.cpp +++ b/test/fuzztest/amsmgrscheduler_fuzzer/amsmgrscheduler_fuzzer.cpp @@ -146,7 +146,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/appforegroundstateobserverproxy_fuzzer/appforegroundstateobserverproxy_fuzzer.cpp b/test/fuzztest/appforegroundstateobserverproxy_fuzzer/appforegroundstateobserverproxy_fuzzer.cpp index ad068bd867..1ff8c44433 100644 --- a/test/fuzztest/appforegroundstateobserverproxy_fuzzer/appforegroundstateobserverproxy_fuzzer.cpp +++ b/test/fuzztest/appforegroundstateobserverproxy_fuzzer/appforegroundstateobserverproxy_fuzzer.cpp @@ -80,7 +80,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/applicationanrlistener_fuzzer/applicationanrlistener_fuzzer.cpp b/test/fuzztest/applicationanrlistener_fuzzer/applicationanrlistener_fuzzer.cpp index 1917dcd5a5..785a310dfd 100755 --- a/test/fuzztest/applicationanrlistener_fuzzer/applicationanrlistener_fuzzer.cpp +++ b/test/fuzztest/applicationanrlistener_fuzzer/applicationanrlistener_fuzzer.cpp @@ -202,7 +202,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/applifecycledeal_fuzzer/applifecycledeal_fuzzer.cpp b/test/fuzztest/applifecycledeal_fuzzer/applifecycledeal_fuzzer.cpp index 099b18c899..3393fbd467 100644 --- a/test/fuzztest/applifecycledeal_fuzzer/applifecycledeal_fuzzer.cpp +++ b/test/fuzztest/applifecycledeal_fuzzer/applifecycledeal_fuzzer.cpp @@ -108,7 +108,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/appmanager_fuzzer/appmanager_fuzzer.cpp b/test/fuzztest/appmanager_fuzzer/appmanager_fuzzer.cpp index 0d6d5d841b..bf0043649d 100644 --- a/test/fuzztest/appmanager_fuzzer/appmanager_fuzzer.cpp +++ b/test/fuzztest/appmanager_fuzzer/appmanager_fuzzer.cpp @@ -77,7 +77,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/appmgrclientrest_fuzzer/appmgrclientrest_fuzzer.cpp b/test/fuzztest/appmgrclientrest_fuzzer/appmgrclientrest_fuzzer.cpp index a1b7204525..84e11362f0 100755 --- a/test/fuzztest/appmgrclientrest_fuzzer/appmgrclientrest_fuzzer.cpp +++ b/test/fuzztest/appmgrclientrest_fuzzer/appmgrclientrest_fuzzer.cpp @@ -76,7 +76,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/appmgrrest_fuzzer/appmgrrest_fuzzer.cpp b/test/fuzztest/appmgrrest_fuzzer/appmgrrest_fuzzer.cpp index 47566bc038..140c836fbc 100755 --- a/test/fuzztest/appmgrrest_fuzzer/appmgrrest_fuzzer.cpp +++ b/test/fuzztest/appmgrrest_fuzzer/appmgrrest_fuzzer.cpp @@ -115,7 +115,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/appmgrservicefirst_fuzzer/appmgrservicefirst_fuzzer.cpp b/test/fuzztest/appmgrservicefirst_fuzzer/appmgrservicefirst_fuzzer.cpp index 82d9377d15..7c359ff9fa 100644 --- a/test/fuzztest/appmgrservicefirst_fuzzer/appmgrservicefirst_fuzzer.cpp +++ b/test/fuzztest/appmgrservicefirst_fuzzer/appmgrservicefirst_fuzzer.cpp @@ -157,7 +157,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/appmgrstub_fuzzer/appmgrstub_fuzzer.cpp b/test/fuzztest/appmgrstub_fuzzer/appmgrstub_fuzzer.cpp index 43cbd9b147..a7018e6e45 100644 --- a/test/fuzztest/appmgrstub_fuzzer/appmgrstub_fuzzer.cpp +++ b/test/fuzztest/appmgrstub_fuzzer/appmgrstub_fuzzer.cpp @@ -86,7 +86,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/apprunningstatusproxy_fuzzer/apprunningstatusproxy_fuzzer.cpp b/test/fuzztest/apprunningstatusproxy_fuzzer/apprunningstatusproxy_fuzzer.cpp index d1392e82b6..0dbb038ada 100644 --- a/test/fuzztest/apprunningstatusproxy_fuzzer/apprunningstatusproxy_fuzzer.cpp +++ b/test/fuzztest/apprunningstatusproxy_fuzzer/apprunningstatusproxy_fuzzer.cpp @@ -77,7 +77,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/appstateobservermanager_fuzzer/appstateobservermanager_fuzzer.cpp b/test/fuzztest/appstateobservermanager_fuzzer/appstateobservermanager_fuzzer.cpp index 0a668e52e9..4ff7c25438 100644 --- a/test/fuzztest/appstateobservermanager_fuzzer/appstateobservermanager_fuzzer.cpp +++ b/test/fuzztest/appstateobservermanager_fuzzer/appstateobservermanager_fuzzer.cpp @@ -86,7 +86,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/assertfaultcallbackdeathmgr_fuzzer/assertfaultcallbackdeathmgr_fuzzer.cpp b/test/fuzztest/assertfaultcallbackdeathmgr_fuzzer/assertfaultcallbackdeathmgr_fuzzer.cpp index 939f46ac7f..8170a26397 100644 --- a/test/fuzztest/assertfaultcallbackdeathmgr_fuzzer/assertfaultcallbackdeathmgr_fuzzer.cpp +++ b/test/fuzztest/assertfaultcallbackdeathmgr_fuzzer/assertfaultcallbackdeathmgr_fuzzer.cpp @@ -76,7 +76,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/assertfaultproxy_fuzzer/assertfaultproxy_fuzzer.cpp b/test/fuzztest/assertfaultproxy_fuzzer/assertfaultproxy_fuzzer.cpp index 434c37b1cd..2fb3c44f3a 100644 --- a/test/fuzztest/assertfaultproxy_fuzzer/assertfaultproxy_fuzzer.cpp +++ b/test/fuzztest/assertfaultproxy_fuzzer/assertfaultproxy_fuzzer.cpp @@ -94,7 +94,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/attachabilitythread_fuzzer/attachabilitythread_fuzzer.cpp b/test/fuzztest/attachabilitythread_fuzzer/attachabilitythread_fuzzer.cpp index ead6adc03d..bbc1f51ede 100755 --- a/test/fuzztest/attachabilitythread_fuzzer/attachabilitythread_fuzzer.cpp +++ b/test/fuzztest/attachabilitythread_fuzzer/attachabilitythread_fuzzer.cpp @@ -245,7 +245,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/attachrenderprocess_fuzzer/attachrenderprocess_fuzzer.cpp b/test/fuzztest/attachrenderprocess_fuzzer/attachrenderprocess_fuzzer.cpp index 9203b56b54..5d3c6918f0 100755 --- a/test/fuzztest/attachrenderprocess_fuzzer/attachrenderprocess_fuzzer.cpp +++ b/test/fuzztest/attachrenderprocess_fuzzer/attachrenderprocess_fuzzer.cpp @@ -60,7 +60,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/bundlemgrhelper_fuzzer/bundlemgrhelper_fuzzer.cpp b/test/fuzztest/bundlemgrhelper_fuzzer/bundlemgrhelper_fuzzer.cpp index a746c303fd..a6731b31a3 100755 --- a/test/fuzztest/bundlemgrhelper_fuzzer/bundlemgrhelper_fuzzer.cpp +++ b/test/fuzztest/bundlemgrhelper_fuzzer/bundlemgrhelper_fuzzer.cpp @@ -169,7 +169,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/cacheprocessmanagera_fuzzer/cacheprocessmanagera_fuzzer.cpp b/test/fuzztest/cacheprocessmanagera_fuzzer/cacheprocessmanagera_fuzzer.cpp index afbefc435b..78e7db6408 100755 --- a/test/fuzztest/cacheprocessmanagera_fuzzer/cacheprocessmanagera_fuzzer.cpp +++ b/test/fuzztest/cacheprocessmanagera_fuzzer/cacheprocessmanagera_fuzzer.cpp @@ -207,7 +207,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/cacheprocessmanagerb_fuzzer/cacheprocessmanagerb_fuzzer.cpp b/test/fuzztest/cacheprocessmanagerb_fuzzer/cacheprocessmanagerb_fuzzer.cpp index 08a0264ca0..3b3b3ad452 100755 --- a/test/fuzztest/cacheprocessmanagerb_fuzzer/cacheprocessmanagerb_fuzzer.cpp +++ b/test/fuzztest/cacheprocessmanagerb_fuzzer/cacheprocessmanagerb_fuzzer.cpp @@ -152,7 +152,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/cleanallmissions_fuzzer/cleanallmissions_fuzzer.cpp b/test/fuzztest/cleanallmissions_fuzzer/cleanallmissions_fuzzer.cpp index 9b343204fc..7db9a5d325 100755 --- a/test/fuzztest/cleanallmissions_fuzzer/cleanallmissions_fuzzer.cpp +++ b/test/fuzztest/cleanallmissions_fuzzer/cleanallmissions_fuzzer.cpp @@ -58,7 +58,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/cleanmission_fuzzer/cleanmission_fuzzer.cpp b/test/fuzztest/cleanmission_fuzzer/cleanmission_fuzzer.cpp index d94c3350bd..058fd877cc 100755 --- a/test/fuzztest/cleanmission_fuzzer/cleanmission_fuzzer.cpp +++ b/test/fuzztest/cleanmission_fuzzer/cleanmission_fuzzer.cpp @@ -63,7 +63,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/clearupapplicationdata_fuzzer/clearupapplicationdata_fuzzer.cpp b/test/fuzztest/clearupapplicationdata_fuzzer/clearupapplicationdata_fuzzer.cpp index fbe90c24c0..5e2afe1ea8 100755 --- a/test/fuzztest/clearupapplicationdata_fuzzer/clearupapplicationdata_fuzzer.cpp +++ b/test/fuzztest/clearupapplicationdata_fuzzer/clearupapplicationdata_fuzzer.cpp @@ -72,7 +72,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/closeability_fuzzer/closeability_fuzzer.cpp b/test/fuzztest/closeability_fuzzer/closeability_fuzzer.cpp index e8ce431bb2..bcec8326e8 100755 --- a/test/fuzztest/closeability_fuzzer/closeability_fuzzer.cpp +++ b/test/fuzztest/closeability_fuzzer/closeability_fuzzer.cpp @@ -92,7 +92,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/connectability_fuzzer/connectability_fuzzer.cpp b/test/fuzztest/connectability_fuzzer/connectability_fuzzer.cpp index c955a4e25f..1dedc12f76 100755 --- a/test/fuzztest/connectability_fuzzer/connectability_fuzzer.cpp +++ b/test/fuzztest/connectability_fuzzer/connectability_fuzzer.cpp @@ -86,7 +86,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/connectionobserverclient_fuzzer/connectionobserverclient_fuzzer.cpp b/test/fuzztest/connectionobserverclient_fuzzer/connectionobserverclient_fuzzer.cpp index 34414b5867..07cf748057 100755 --- a/test/fuzztest/connectionobserverclient_fuzzer/connectionobserverclient_fuzzer.cpp +++ b/test/fuzztest/connectionobserverclient_fuzzer/connectionobserverclient_fuzzer.cpp @@ -108,7 +108,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/connectionstatemanager_fuzzer/connectionstatemanager_fuzzer.cpp b/test/fuzztest/connectionstatemanager_fuzzer/connectionstatemanager_fuzzer.cpp index 0e1cb83201..676483b892 100755 --- a/test/fuzztest/connectionstatemanager_fuzzer/connectionstatemanager_fuzzer.cpp +++ b/test/fuzztest/connectionstatemanager_fuzzer/connectionstatemanager_fuzzer.cpp @@ -246,7 +246,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/continueability_fuzzer/continueability_fuzzer.cpp b/test/fuzztest/continueability_fuzzer/continueability_fuzzer.cpp index 2bd517dced..6015c84d47 100755 --- a/test/fuzztest/continueability_fuzzer/continueability_fuzzer.cpp +++ b/test/fuzztest/continueability_fuzzer/continueability_fuzzer.cpp @@ -65,7 +65,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/continuemission_fuzzer/continuemission_fuzzer.cpp b/test/fuzztest/continuemission_fuzzer/continuemission_fuzzer.cpp index 98ef6f4cff..f38ac7d7dd 100755 --- a/test/fuzztest/continuemission_fuzzer/continuemission_fuzzer.cpp +++ b/test/fuzztest/continuemission_fuzzer/continuemission_fuzzer.cpp @@ -76,7 +76,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/crowdtestinterceptor_fuzzer/crowdtestinterceptor_fuzzer.cpp b/test/fuzztest/crowdtestinterceptor_fuzzer/crowdtestinterceptor_fuzzer.cpp index bf48870bcc..4818dbfe92 100644 --- a/test/fuzztest/crowdtestinterceptor_fuzzer/crowdtestinterceptor_fuzzer.cpp +++ b/test/fuzztest/crowdtestinterceptor_fuzzer/crowdtestinterceptor_fuzzer.cpp @@ -91,7 +91,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) return 0; } - char *ch = (char *)malloc(size + 1); + char *ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/dataabilitymanager_fuzzer/dataabilitymanager_fuzzer.cpp b/test/fuzztest/dataabilitymanager_fuzzer/dataabilitymanager_fuzzer.cpp index 54f95189be..4967a3366b 100755 --- a/test/fuzztest/dataabilitymanager_fuzzer/dataabilitymanager_fuzzer.cpp +++ b/test/fuzztest/dataabilitymanager_fuzzer/dataabilitymanager_fuzzer.cpp @@ -120,7 +120,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/dialogsessioninfo_fuzzer/dialogsessioninfo_fuzzer.cpp b/test/fuzztest/dialogsessioninfo_fuzzer/dialogsessioninfo_fuzzer.cpp index 6e2d00de6b..9a37eb4b66 100644 --- a/test/fuzztest/dialogsessioninfo_fuzzer/dialogsessioninfo_fuzzer.cpp +++ b/test/fuzztest/dialogsessioninfo_fuzzer/dialogsessioninfo_fuzzer.cpp @@ -75,7 +75,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) return 0; } - char *ch = (char *)malloc(size + 1); + char *ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/dialogsessionmanager_fuzzer/dialogsessionmanager_fuzzer.cpp b/test/fuzztest/dialogsessionmanager_fuzzer/dialogsessionmanager_fuzzer.cpp index 6528c733d0..4ea228b711 100644 --- a/test/fuzztest/dialogsessionmanager_fuzzer/dialogsessionmanager_fuzzer.cpp +++ b/test/fuzztest/dialogsessionmanager_fuzzer/dialogsessionmanager_fuzzer.cpp @@ -119,7 +119,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) return 0; } - char *ch = (char *)malloc(size + 1); + char *ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/doabilitybackground_fuzzer/doabilitybackground_fuzzer.cpp b/test/fuzztest/doabilitybackground_fuzzer/doabilitybackground_fuzzer.cpp index 1d203ed370..165443b5c8 100644 --- a/test/fuzztest/doabilitybackground_fuzzer/doabilitybackground_fuzzer.cpp +++ b/test/fuzztest/doabilitybackground_fuzzer/doabilitybackground_fuzzer.cpp @@ -84,7 +84,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/doabilityforeground_fuzzer/doabilityforeground_fuzzer.cpp b/test/fuzztest/doabilityforeground_fuzzer/doabilityforeground_fuzzer.cpp index 21d5e4b129..78d2883d51 100644 --- a/test/fuzztest/doabilityforeground_fuzzer/doabilityforeground_fuzzer.cpp +++ b/test/fuzztest/doabilityforeground_fuzzer/doabilityforeground_fuzzer.cpp @@ -85,7 +85,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/dumpabilityinfodone_fuzzer/dumpabilityinfodone_fuzzer.cpp b/test/fuzztest/dumpabilityinfodone_fuzzer/dumpabilityinfodone_fuzzer.cpp index 7b49d08d88..1d48364982 100644 --- a/test/fuzztest/dumpabilityinfodone_fuzzer/dumpabilityinfodone_fuzzer.cpp +++ b/test/fuzztest/dumpabilityinfodone_fuzzer/dumpabilityinfodone_fuzzer.cpp @@ -81,7 +81,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/dumpstate_fuzzer/dumpstate_fuzzer.cpp b/test/fuzztest/dumpstate_fuzzer/dumpstate_fuzzer.cpp index ddc661398e..901646419a 100644 --- a/test/fuzztest/dumpstate_fuzzer/dumpstate_fuzzer.cpp +++ b/test/fuzztest/dumpstate_fuzzer/dumpstate_fuzzer.cpp @@ -61,7 +61,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/dumpsysstate_fuzzer/dumpsysstate_fuzzer.cpp b/test/fuzztest/dumpsysstate_fuzzer/dumpsysstate_fuzzer.cpp index b468715a65..6ebb605842 100644 --- a/test/fuzztest/dumpsysstate_fuzzer/dumpsysstate_fuzzer.cpp +++ b/test/fuzztest/dumpsysstate_fuzzer/dumpsysstate_fuzzer.cpp @@ -64,7 +64,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/extensionconfig_fuzzer/extensionconfig_fuzzer.cpp b/test/fuzztest/extensionconfig_fuzzer/extensionconfig_fuzzer.cpp index 2040afe528..066eb3c9ca 100644 --- a/test/fuzztest/extensionconfig_fuzzer/extensionconfig_fuzzer.cpp +++ b/test/fuzztest/extensionconfig_fuzzer/extensionconfig_fuzzer.cpp @@ -80,7 +80,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) return 0; } - char *ch = (char *)malloc(size + 1); + char *ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/extensioncontrolinterceptor_fuzzer/extension_control_interceptor_fuzzer.cpp b/test/fuzztest/extensioncontrolinterceptor_fuzzer/extension_control_interceptor_fuzzer.cpp index 6e89741112..072f683415 100644 --- a/test/fuzztest/extensioncontrolinterceptor_fuzzer/extension_control_interceptor_fuzzer.cpp +++ b/test/fuzztest/extensioncontrolinterceptor_fuzzer/extension_control_interceptor_fuzzer.cpp @@ -90,7 +90,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) return 0; } - char *ch = (char *)malloc(size + 1); + char *ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/extensionpermissionsutil_fuzzer/extension_permissions_util_fuzzer.cpp b/test/fuzztest/extensionpermissionsutil_fuzzer/extension_permissions_util_fuzzer.cpp index febd5b0910..1432984864 100755 --- a/test/fuzztest/extensionpermissionsutil_fuzzer/extension_permissions_util_fuzzer.cpp +++ b/test/fuzztest/extensionpermissionsutil_fuzzer/extension_permissions_util_fuzzer.cpp @@ -73,7 +73,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) return 0; } - char *ch = (char *)malloc(size + 1); + char *ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/extensionrecordfactory_fuzzer/extensionrecordfactory_fuzzer.cpp b/test/fuzztest/extensionrecordfactory_fuzzer/extensionrecordfactory_fuzzer.cpp index 0050ec2f85..fd10e45e6d 100644 --- a/test/fuzztest/extensionrecordfactory_fuzzer/extensionrecordfactory_fuzzer.cpp +++ b/test/fuzztest/extensionrecordfactory_fuzzer/extensionrecordfactory_fuzzer.cpp @@ -83,7 +83,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) return 0; } - char *ch = (char *)malloc(size + 1); + char *ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/extensionrecordmanager_fuzzer/extensionrecordmanager_fuzzer.cpp b/test/fuzztest/extensionrecordmanager_fuzzer/extensionrecordmanager_fuzzer.cpp index 90f513f4a1..328a32e86f 100644 --- a/test/fuzztest/extensionrecordmanager_fuzzer/extensionrecordmanager_fuzzer.cpp +++ b/test/fuzztest/extensionrecordmanager_fuzzer/extensionrecordmanager_fuzzer.cpp @@ -126,7 +126,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) return 0; } - char *ch = (char *)malloc(size + 1); + char *ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/extensionrecordmanagera_fuzzer/extensionrecordmanagera_fuzzer.cpp b/test/fuzztest/extensionrecordmanagera_fuzzer/extensionrecordmanagera_fuzzer.cpp index 439e192770..3f3ba33cf8 100755 --- a/test/fuzztest/extensionrecordmanagera_fuzzer/extensionrecordmanagera_fuzzer.cpp +++ b/test/fuzztest/extensionrecordmanagera_fuzzer/extensionrecordmanagera_fuzzer.cpp @@ -195,7 +195,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/faultdata_fuzzer/faultdata_fuzzer.cpp b/test/fuzztest/faultdata_fuzzer/faultdata_fuzzer.cpp index 2bca96b929..3129f5c59e 100755 --- a/test/fuzztest/faultdata_fuzzer/faultdata_fuzzer.cpp +++ b/test/fuzztest/faultdata_fuzzer/faultdata_fuzzer.cpp @@ -161,7 +161,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/forcetimeoutfortest_fuzzer/forcetimeoutfortest_fuzzer.cpp b/test/fuzztest/forcetimeoutfortest_fuzzer/forcetimeoutfortest_fuzzer.cpp index 95d003e8b9..5ebc509273 100644 --- a/test/fuzztest/forcetimeoutfortest_fuzzer/forcetimeoutfortest_fuzzer.cpp +++ b/test/fuzztest/forcetimeoutfortest_fuzzer/forcetimeoutfortest_fuzzer.cpp @@ -59,7 +59,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) return 0; } - char *ch = (char *)malloc(size + 1); + char *ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/freeinstallabilityfromremote_fuzzer/freeinstallabilityfromremote_fuzzer.cpp b/test/fuzztest/freeinstallabilityfromremote_fuzzer/freeinstallabilityfromremote_fuzzer.cpp index c6136ecbbe..610d8ab9a9 100644 --- a/test/fuzztest/freeinstallabilityfromremote_fuzzer/freeinstallabilityfromremote_fuzzer.cpp +++ b/test/fuzztest/freeinstallabilityfromremote_fuzzer/freeinstallabilityfromremote_fuzzer.cpp @@ -97,7 +97,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/freezeutil_fuzzer/freezeutil_fuzzer.cpp b/test/fuzztest/freezeutil_fuzzer/freezeutil_fuzzer.cpp index 3d24d33a65..f2d3835a7b 100644 --- a/test/fuzztest/freezeutil_fuzzer/freezeutil_fuzzer.cpp +++ b/test/fuzztest/freezeutil_fuzzer/freezeutil_fuzzer.cpp @@ -77,7 +77,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/getapplicationinfobyprocessid_fuzzer/getapplicationinfobyprocessid_fuzzer.cpp b/test/fuzztest/getapplicationinfobyprocessid_fuzzer/getapplicationinfobyprocessid_fuzzer.cpp index 95bc7fc2e3..28f209bd0a 100755 --- a/test/fuzztest/getapplicationinfobyprocessid_fuzzer/getapplicationinfobyprocessid_fuzzer.cpp +++ b/test/fuzztest/getapplicationinfobyprocessid_fuzzer/getapplicationinfobyprocessid_fuzzer.cpp @@ -69,7 +69,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/getappmemorysize_fuzzer/getappmemorysize_fuzzer.cpp b/test/fuzztest/getappmemorysize_fuzzer/getappmemorysize_fuzzer.cpp index 9fb156e815..0a6e80d223 100755 --- a/test/fuzztest/getappmemorysize_fuzzer/getappmemorysize_fuzzer.cpp +++ b/test/fuzztest/getappmemorysize_fuzzer/getappmemorysize_fuzzer.cpp @@ -72,7 +72,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/getconfiguration_fuzzer/getconfiguration_fuzzer.cpp b/test/fuzztest/getconfiguration_fuzzer/getconfiguration_fuzzer.cpp index 46ef1096b1..8b91132c21 100755 --- a/test/fuzztest/getconfiguration_fuzzer/getconfiguration_fuzzer.cpp +++ b/test/fuzztest/getconfiguration_fuzzer/getconfiguration_fuzzer.cpp @@ -66,7 +66,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/getmissionidbytoken_fuzzer/getmissionidbytoken_fuzzer.cpp b/test/fuzztest/getmissionidbytoken_fuzzer/getmissionidbytoken_fuzzer.cpp index 33d12a08a7..3194c6049e 100755 --- a/test/fuzztest/getmissionidbytoken_fuzzer/getmissionidbytoken_fuzzer.cpp +++ b/test/fuzztest/getmissionidbytoken_fuzzer/getmissionidbytoken_fuzzer.cpp @@ -85,7 +85,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/getmissioninfos_fuzzer/getmissioninfos_fuzzer.cpp b/test/fuzztest/getmissioninfos_fuzzer/getmissioninfos_fuzzer.cpp index 75e6974f89..71bbedef8d 100755 --- a/test/fuzztest/getmissioninfos_fuzzer/getmissioninfos_fuzzer.cpp +++ b/test/fuzztest/getmissioninfos_fuzzer/getmissioninfos_fuzzer.cpp @@ -65,7 +65,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/getprocessrunninginfosbyuserid_fuzzer/getprocessrunninginfosbyuserid_fuzzer.cpp b/test/fuzztest/getprocessrunninginfosbyuserid_fuzzer/getprocessrunninginfosbyuserid_fuzzer.cpp index 7c7366743e..6bfeb27a6e 100755 --- a/test/fuzztest/getprocessrunninginfosbyuserid_fuzzer/getprocessrunninginfosbyuserid_fuzzer.cpp +++ b/test/fuzztest/getprocessrunninginfosbyuserid_fuzzer/getprocessrunninginfosbyuserid_fuzzer.cpp @@ -67,7 +67,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/getwantsender_fuzzer/getwantsender_fuzzer.cpp b/test/fuzztest/getwantsender_fuzzer/getwantsender_fuzzer.cpp index 9dba85a27b..70533bc843 100755 --- a/test/fuzztest/getwantsender_fuzzer/getwantsender_fuzzer.cpp +++ b/test/fuzztest/getwantsender_fuzzer/getwantsender_fuzzer.cpp @@ -104,7 +104,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/handledlpapp_fuzzer/handledlpapp_fuzzer.cpp b/test/fuzztest/handledlpapp_fuzzer/handledlpapp_fuzzer.cpp index 5e218a262f..7341571212 100755 --- a/test/fuzztest/handledlpapp_fuzzer/handledlpapp_fuzzer.cpp +++ b/test/fuzztest/handledlpapp_fuzzer/handledlpapp_fuzzer.cpp @@ -69,7 +69,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/insightintentexecutecallbackstub_fuzzer/insightintentexecutecallbackstub_fuzzer.cpp b/test/fuzztest/insightintentexecutecallbackstub_fuzzer/insightintentexecutecallbackstub_fuzzer.cpp index 4ee9ae47dd..e7f574ead0 100644 --- a/test/fuzztest/insightintentexecutecallbackstub_fuzzer/insightintentexecutecallbackstub_fuzzer.cpp +++ b/test/fuzztest/insightintentexecutecallbackstub_fuzzer/insightintentexecutecallbackstub_fuzzer.cpp @@ -90,7 +90,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) return 0; } - char *ch = (char *)malloc(size + 1); + char *ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/isramconstraineddevice_fuzzer/isramconstraineddevice_fuzzer.cpp b/test/fuzztest/isramconstraineddevice_fuzzer/isramconstraineddevice_fuzzer.cpp index d2a2e167a7..f0f1152120 100755 --- a/test/fuzztest/isramconstraineddevice_fuzzer/isramconstraineddevice_fuzzer.cpp +++ b/test/fuzztest/isramconstraineddevice_fuzzer/isramconstraineddevice_fuzzer.cpp @@ -71,7 +71,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/jsabilityautostartupmanager_fuzzer/jsabilityautostartupmanager_fuzzer.cpp b/test/fuzztest/jsabilityautostartupmanager_fuzzer/jsabilityautostartupmanager_fuzzer.cpp index b4c9e96b09..2bada8f662 100755 --- a/test/fuzztest/jsabilityautostartupmanager_fuzzer/jsabilityautostartupmanager_fuzzer.cpp +++ b/test/fuzztest/jsabilityautostartupmanager_fuzzer/jsabilityautostartupmanager_fuzzer.cpp @@ -99,7 +99,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/killapplicationself_fuzzer/killapplicationself_fuzzer.cpp b/test/fuzztest/killapplicationself_fuzzer/killapplicationself_fuzzer.cpp index f708326e5c..6aa1fc3acb 100755 --- a/test/fuzztest/killapplicationself_fuzzer/killapplicationself_fuzzer.cpp +++ b/test/fuzztest/killapplicationself_fuzzer/killapplicationself_fuzzer.cpp @@ -59,7 +59,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/killprocessesbybundlename_fuzzer/killprocessesbybundlename_fuzzer.cpp b/test/fuzztest/killprocessesbybundlename_fuzzer/killprocessesbybundlename_fuzzer.cpp index 6ab79aab96..03f364a6ff 100755 --- a/test/fuzztest/killprocessesbybundlename_fuzzer/killprocessesbybundlename_fuzzer.cpp +++ b/test/fuzztest/killprocessesbybundlename_fuzzer/killprocessesbybundlename_fuzzer.cpp @@ -58,7 +58,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/killprocessesbyuserid_fuzzer/killprocessesbyuserid_fuzzer.cpp b/test/fuzztest/killprocessesbyuserid_fuzzer/killprocessesbyuserid_fuzzer.cpp index 6d4fcea7fb..b9680a128d 100755 --- a/test/fuzztest/killprocessesbyuserid_fuzzer/killprocessesbyuserid_fuzzer.cpp +++ b/test/fuzztest/killprocessesbyuserid_fuzzer/killprocessesbyuserid_fuzzer.cpp @@ -66,7 +66,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/loadability_fuzzer/loadability_fuzzer.cpp b/test/fuzztest/loadability_fuzzer/loadability_fuzzer.cpp index 0421298b08..6118e9562b 100755 --- a/test/fuzztest/loadability_fuzzer/loadability_fuzzer.cpp +++ b/test/fuzztest/loadability_fuzzer/loadability_fuzzer.cpp @@ -117,7 +117,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/lockmissionforcleanup_fuzzer/lockmissionforcleanup_fuzzer.cpp b/test/fuzztest/lockmissionforcleanup_fuzzer/lockmissionforcleanup_fuzzer.cpp index 30557728b3..51bce0bbda 100644 --- a/test/fuzztest/lockmissionforcleanup_fuzzer/lockmissionforcleanup_fuzzer.cpp +++ b/test/fuzztest/lockmissionforcleanup_fuzzer/lockmissionforcleanup_fuzzer.cpp @@ -62,7 +62,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/missiondatastorage_fuzzer/missiondatastorage_fuzzer.cpp b/test/fuzztest/missiondatastorage_fuzzer/missiondatastorage_fuzzer.cpp index a1619c446f..21b9360425 100644 --- a/test/fuzztest/missiondatastorage_fuzzer/missiondatastorage_fuzzer.cpp +++ b/test/fuzztest/missiondatastorage_fuzzer/missiondatastorage_fuzzer.cpp @@ -103,7 +103,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/missioninfomgra_fuzzer/missioninfomgra_fuzzer.cpp b/test/fuzztest/missioninfomgra_fuzzer/missioninfomgra_fuzzer.cpp index b969958a79..ae7e2d19ee 100644 --- a/test/fuzztest/missioninfomgra_fuzzer/missioninfomgra_fuzzer.cpp +++ b/test/fuzztest/missioninfomgra_fuzzer/missioninfomgra_fuzzer.cpp @@ -69,7 +69,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/missioninfomgrb_fuzzer/missioninfomgrb_fuzzer.cpp b/test/fuzztest/missioninfomgrb_fuzzer/missioninfomgrb_fuzzer.cpp index f88bc975e1..fb5d21c1ae 100644 --- a/test/fuzztest/missioninfomgrb_fuzzer/missioninfomgrb_fuzzer.cpp +++ b/test/fuzztest/missioninfomgrb_fuzzer/missioninfomgrb_fuzzer.cpp @@ -70,7 +70,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) return 0; } - char *ch = (char *)malloc(size + 1); + char *ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/missioninfomgrc_fuzzer/missioninfomgrc_fuzzer.cpp b/test/fuzztest/missioninfomgrc_fuzzer/missioninfomgrc_fuzzer.cpp index d446e8a02a..2745d1170f 100644 --- a/test/fuzztest/missioninfomgrc_fuzzer/missioninfomgrc_fuzzer.cpp +++ b/test/fuzztest/missioninfomgrc_fuzzer/missioninfomgrc_fuzzer.cpp @@ -97,7 +97,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) return 0; } - char *ch = (char *)malloc(size + 1); + char *ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/missionlistenercontroller_fuzzer/missionlistenercontroller_fuzzer.cpp b/test/fuzztest/missionlistenercontroller_fuzzer/missionlistenercontroller_fuzzer.cpp index f5d1397951..441b632754 100644 --- a/test/fuzztest/missionlistenercontroller_fuzzer/missionlistenercontroller_fuzzer.cpp +++ b/test/fuzztest/missionlistenercontroller_fuzzer/missionlistenercontroller_fuzzer.cpp @@ -230,7 +230,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/missionlistmanagerfirst_fuzzer/missionlistmanagerfirst_fuzzer.cpp b/test/fuzztest/missionlistmanagerfirst_fuzzer/missionlistmanagerfirst_fuzzer.cpp index b4bda51657..3bbd58052d 100644 --- a/test/fuzztest/missionlistmanagerfirst_fuzzer/missionlistmanagerfirst_fuzzer.cpp +++ b/test/fuzztest/missionlistmanagerfirst_fuzzer/missionlistmanagerfirst_fuzzer.cpp @@ -298,7 +298,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/missionlistmanagerfourth_fuzzer/missionlistmanagerfourth_fuzzer.cpp b/test/fuzztest/missionlistmanagerfourth_fuzzer/missionlistmanagerfourth_fuzzer.cpp index a574aed3ff..7288b43a75 100644 --- a/test/fuzztest/missionlistmanagerfourth_fuzzer/missionlistmanagerfourth_fuzzer.cpp +++ b/test/fuzztest/missionlistmanagerfourth_fuzzer/missionlistmanagerfourth_fuzzer.cpp @@ -133,7 +133,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) if (size < OHOS::U32_AT_SIZE) { return 0; } - char *ch = (char *)malloc(size + 1); + char *ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/missionlistmanagersecond_fuzzer/missionlistmanagersecond_fuzzer.cpp b/test/fuzztest/missionlistmanagersecond_fuzzer/missionlistmanagersecond_fuzzer.cpp index 450e8d2183..4de63bfafd 100644 --- a/test/fuzztest/missionlistmanagersecond_fuzzer/missionlistmanagersecond_fuzzer.cpp +++ b/test/fuzztest/missionlistmanagersecond_fuzzer/missionlistmanagersecond_fuzzer.cpp @@ -198,7 +198,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/missionlistmanagerthird_fuzzer/missionlistmanagerthird_fuzzer.cpp b/test/fuzztest/missionlistmanagerthird_fuzzer/missionlistmanagerthird_fuzzer.cpp index 9419e77c2e..56d3c3576f 100644 --- a/test/fuzztest/missionlistmanagerthird_fuzzer/missionlistmanagerthird_fuzzer.cpp +++ b/test/fuzztest/missionlistmanagerthird_fuzzer/missionlistmanagerthird_fuzzer.cpp @@ -135,7 +135,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/modulerunningrecord_fuzzer/modulerunningrecord_fuzzer.cpp b/test/fuzztest/modulerunningrecord_fuzzer/modulerunningrecord_fuzzer.cpp index cc961b341c..224be08982 100644 --- a/test/fuzztest/modulerunningrecord_fuzzer/modulerunningrecord_fuzzer.cpp +++ b/test/fuzztest/modulerunningrecord_fuzzer/modulerunningrecord_fuzzer.cpp @@ -116,7 +116,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/napicommonwant_fuzzer/napicommonwant_fuzzer.cpp b/test/fuzztest/napicommonwant_fuzzer/napicommonwant_fuzzer.cpp index 1fa08988cc..be67589877 100755 --- a/test/fuzztest/napicommonwant_fuzzer/napicommonwant_fuzzer.cpp +++ b/test/fuzztest/napicommonwant_fuzzer/napicommonwant_fuzzer.cpp @@ -368,7 +368,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/notifycompletecontinuation_fuzzer/notifycompletecontinuation_fuzzer.cpp b/test/fuzztest/notifycompletecontinuation_fuzzer/notifycompletecontinuation_fuzzer.cpp index 28cb826051..e3d3246fa2 100644 --- a/test/fuzztest/notifycompletecontinuation_fuzzer/notifycompletecontinuation_fuzzer.cpp +++ b/test/fuzztest/notifycompletecontinuation_fuzzer/notifycompletecontinuation_fuzzer.cpp @@ -65,7 +65,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/notifycontinuationresult_fuzzer/notifycontinuationresult_fuzzer.cpp b/test/fuzztest/notifycontinuationresult_fuzzer/notifycontinuationresult_fuzzer.cpp index a1afa1a953..84b9ad970a 100644 --- a/test/fuzztest/notifycontinuationresult_fuzzer/notifycontinuationresult_fuzzer.cpp +++ b/test/fuzztest/notifycontinuationresult_fuzzer/notifycontinuationresult_fuzzer.cpp @@ -63,7 +63,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/openlinkoptions_fuzzer/openlinkoptions_fuzzer.cpp b/test/fuzztest/openlinkoptions_fuzzer/openlinkoptions_fuzzer.cpp index 255aa56f38..e901a18b16 100644 --- a/test/fuzztest/openlinkoptions_fuzzer/openlinkoptions_fuzzer.cpp +++ b/test/fuzztest/openlinkoptions_fuzzer/openlinkoptions_fuzzer.cpp @@ -75,7 +75,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/pendingwantmanager_fuzzer/pendingwantmanager_fuzzer.cpp b/test/fuzztest/pendingwantmanager_fuzzer/pendingwantmanager_fuzzer.cpp index 5ff87d7966..e41b317b0d 100644 --- a/test/fuzztest/pendingwantmanager_fuzzer/pendingwantmanager_fuzzer.cpp +++ b/test/fuzztest/pendingwantmanager_fuzzer/pendingwantmanager_fuzzer.cpp @@ -179,7 +179,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/prestartnwebspawnprocess_fuzzer/prestartnwebspawnprocess_fuzzer.cpp b/test/fuzztest/prestartnwebspawnprocess_fuzzer/prestartnwebspawnprocess_fuzzer.cpp index 94919e55d9..d574a8d674 100644 --- a/test/fuzztest/prestartnwebspawnprocess_fuzzer/prestartnwebspawnprocess_fuzzer.cpp +++ b/test/fuzztest/prestartnwebspawnprocess_fuzzer/prestartnwebspawnprocess_fuzzer.cpp @@ -62,7 +62,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/registerapplicationstateobserver_fuzzer/registerapplicationstateobserver_fuzzer.cpp b/test/fuzztest/registerapplicationstateobserver_fuzzer/registerapplicationstateobserver_fuzzer.cpp index c71bb42b7a..a8de555613 100644 --- a/test/fuzztest/registerapplicationstateobserver_fuzzer/registerapplicationstateobserver_fuzzer.cpp +++ b/test/fuzztest/registerapplicationstateobserver_fuzzer/registerapplicationstateobserver_fuzzer.cpp @@ -65,7 +65,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/registerconfigurationobserver_fuzzer/registerconfigurationobserver_fuzzer.cpp b/test/fuzztest/registerconfigurationobserver_fuzzer/registerconfigurationobserver_fuzzer.cpp index 390b6342c9..5f9f9624f9 100755 --- a/test/fuzztest/registerconfigurationobserver_fuzzer/registerconfigurationobserver_fuzzer.cpp +++ b/test/fuzztest/registerconfigurationobserver_fuzzer/registerconfigurationobserver_fuzzer.cpp @@ -64,7 +64,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/registerenvironmentcallback_fuzzer/registerenvironmentcallback_fuzzer.cpp b/test/fuzztest/registerenvironmentcallback_fuzzer/registerenvironmentcallback_fuzzer.cpp index cf1a2d9796..e316f429ad 100755 --- a/test/fuzztest/registerenvironmentcallback_fuzzer/registerenvironmentcallback_fuzzer.cpp +++ b/test/fuzztest/registerenvironmentcallback_fuzzer/registerenvironmentcallback_fuzzer.cpp @@ -70,7 +70,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/registermissionlistener_fuzzer/registermissionlistener_fuzzer.cpp b/test/fuzztest/registermissionlistener_fuzzer/registermissionlistener_fuzzer.cpp index d031222c78..48f3e7b730 100755 --- a/test/fuzztest/registermissionlistener_fuzzer/registermissionlistener_fuzzer.cpp +++ b/test/fuzztest/registermissionlistener_fuzzer/registermissionlistener_fuzzer.cpp @@ -88,7 +88,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/renderstateobserverproxy_fuzzer/renderstateobserverproxy_fuzzer.cpp b/test/fuzztest/renderstateobserverproxy_fuzzer/renderstateobserverproxy_fuzzer.cpp index f1c965c08c..19380b91e0 100644 --- a/test/fuzztest/renderstateobserverproxy_fuzzer/renderstateobserverproxy_fuzzer.cpp +++ b/test/fuzztest/renderstateobserverproxy_fuzzer/renderstateobserverproxy_fuzzer.cpp @@ -86,7 +86,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/scheduleacceptwantdone_fuzzer/scheduleacceptwantdone_fuzzer.cpp b/test/fuzztest/scheduleacceptwantdone_fuzzer/scheduleacceptwantdone_fuzzer.cpp index e8187e43ef..c08bcaa9d0 100755 --- a/test/fuzztest/scheduleacceptwantdone_fuzzer/scheduleacceptwantdone_fuzzer.cpp +++ b/test/fuzztest/scheduleacceptwantdone_fuzzer/scheduleacceptwantdone_fuzzer.cpp @@ -76,7 +76,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/schedulecommandabilitydone_fuzzer/schedulecommandabilitydone_fuzzer.cpp b/test/fuzztest/schedulecommandabilitydone_fuzzer/schedulecommandabilitydone_fuzzer.cpp index aef722a3c0..ed11b41842 100755 --- a/test/fuzztest/schedulecommandabilitydone_fuzzer/schedulecommandabilitydone_fuzzer.cpp +++ b/test/fuzztest/schedulecommandabilitydone_fuzzer/schedulecommandabilitydone_fuzzer.cpp @@ -104,7 +104,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/scheduleconnectabilitydone_fuzzer/scheduleconnectabilitydone_fuzzer.cpp b/test/fuzztest/scheduleconnectabilitydone_fuzzer/scheduleconnectabilitydone_fuzzer.cpp index 199c978908..29913b91f7 100755 --- a/test/fuzztest/scheduleconnectabilitydone_fuzzer/scheduleconnectabilitydone_fuzzer.cpp +++ b/test/fuzztest/scheduleconnectabilitydone_fuzzer/scheduleconnectabilitydone_fuzzer.cpp @@ -105,7 +105,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/scheduledisconnectabilitydone_fuzzer/scheduledisconnectabilitydone_fuzzer.cpp b/test/fuzztest/scheduledisconnectabilitydone_fuzzer/scheduledisconnectabilitydone_fuzzer.cpp index 8a18207aba..b4b88c2ec0 100755 --- a/test/fuzztest/scheduledisconnectabilitydone_fuzzer/scheduledisconnectabilitydone_fuzzer.cpp +++ b/test/fuzztest/scheduledisconnectabilitydone_fuzzer/scheduledisconnectabilitydone_fuzzer.cpp @@ -104,7 +104,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/screenunlockinterceptor_fuzzer/screenunlockinterceptor_fuzzer.cpp b/test/fuzztest/screenunlockinterceptor_fuzzer/screenunlockinterceptor_fuzzer.cpp index af0ef6907e..5bd79b7bba 100644 --- a/test/fuzztest/screenunlockinterceptor_fuzzer/screenunlockinterceptor_fuzzer.cpp +++ b/test/fuzztest/screenunlockinterceptor_fuzzer/screenunlockinterceptor_fuzzer.cpp @@ -92,7 +92,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) return 0; } - char *ch = (char *)malloc(size + 1); + char *ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/sendresulttoability_fuzzer/sendresulttoability_fuzzer.cpp b/test/fuzztest/sendresulttoability_fuzzer/sendresulttoability_fuzzer.cpp index b021da3da8..e51b2f6776 100755 --- a/test/fuzztest/sendresulttoability_fuzzer/sendresulttoability_fuzzer.cpp +++ b/test/fuzztest/sendresulttoability_fuzzer/sendresulttoability_fuzzer.cpp @@ -72,7 +72,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/setabilitycontroller_fuzzer/setabilitycontroller_fuzzer.cpp b/test/fuzztest/setabilitycontroller_fuzzer/setabilitycontroller_fuzzer.cpp index ba9d202c96..7ffb907db3 100755 --- a/test/fuzztest/setabilitycontroller_fuzzer/setabilitycontroller_fuzzer.cpp +++ b/test/fuzztest/setabilitycontroller_fuzzer/setabilitycontroller_fuzzer.cpp @@ -68,7 +68,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/setmissionlabel_fuzzer/setmissionlabel_fuzzer.cpp b/test/fuzztest/setmissionlabel_fuzzer/setmissionlabel_fuzzer.cpp index fee7a8bad2..78e111e661 100755 --- a/test/fuzztest/setmissionlabel_fuzzer/setmissionlabel_fuzzer.cpp +++ b/test/fuzztest/setmissionlabel_fuzzer/setmissionlabel_fuzzer.cpp @@ -81,7 +81,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/startability_fuzzer/startability_fuzzer.cpp b/test/fuzztest/startability_fuzzer/startability_fuzzer.cpp index c30ccfec64..4ea6ccb9f8 100755 --- a/test/fuzztest/startability_fuzzer/startability_fuzzer.cpp +++ b/test/fuzztest/startability_fuzzer/startability_fuzzer.cpp @@ -122,7 +122,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/startabilitybycall_fuzzer/startabilitybycall_fuzzer.cpp b/test/fuzztest/startabilitybycall_fuzzer/startabilitybycall_fuzzer.cpp index 0c63222dab..39e554d234 100755 --- a/test/fuzztest/startabilitybycall_fuzzer/startabilitybycall_fuzzer.cpp +++ b/test/fuzztest/startabilitybycall_fuzzer/startabilitybycall_fuzzer.cpp @@ -97,7 +97,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/startabilityutils_fuzzer/startabilityutils_fuzzer.cpp b/test/fuzztest/startabilityutils_fuzzer/startabilityutils_fuzzer.cpp index e87a3548a5..e9445254fc 100755 --- a/test/fuzztest/startabilityutils_fuzzer/startabilityutils_fuzzer.cpp +++ b/test/fuzztest/startabilityutils_fuzzer/startabilityutils_fuzzer.cpp @@ -104,7 +104,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/startcontinuation_fuzzer/startcontinuation_fuzzer.cpp b/test/fuzztest/startcontinuation_fuzzer/startcontinuation_fuzzer.cpp index 5ad1687b23..3c0b84f504 100755 --- a/test/fuzztest/startcontinuation_fuzzer/startcontinuation_fuzzer.cpp +++ b/test/fuzztest/startcontinuation_fuzzer/startcontinuation_fuzzer.cpp @@ -95,7 +95,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/startrenderprocess_fuzzer/startrenderprocess_fuzzer.cpp b/test/fuzztest/startrenderprocess_fuzzer/startrenderprocess_fuzzer.cpp index d3b873af70..47018ec9d7 100755 --- a/test/fuzztest/startrenderprocess_fuzzer/startrenderprocess_fuzzer.cpp +++ b/test/fuzztest/startrenderprocess_fuzzer/startrenderprocess_fuzzer.cpp @@ -68,7 +68,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/startserviceextensionability_fuzzer/startserviceextensionability_fuzzer.cpp b/test/fuzztest/startserviceextensionability_fuzzer/startserviceextensionability_fuzzer.cpp index 7921cd7b10..60c3f80fb1 100755 --- a/test/fuzztest/startserviceextensionability_fuzzer/startserviceextensionability_fuzzer.cpp +++ b/test/fuzztest/startserviceextensionability_fuzzer/startserviceextensionability_fuzzer.cpp @@ -74,7 +74,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/startspecifiedability_fuzzer/startspecifiedability_fuzzer.cpp b/test/fuzztest/startspecifiedability_fuzzer/startspecifiedability_fuzzer.cpp index 21fc143753..66f5f70148 100755 --- a/test/fuzztest/startspecifiedability_fuzzer/startspecifiedability_fuzzer.cpp +++ b/test/fuzztest/startspecifiedability_fuzzer/startspecifiedability_fuzzer.cpp @@ -75,7 +75,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/startsyncremotemissions_fuzzer/startsyncremotemissions_fuzzer.cpp b/test/fuzztest/startsyncremotemissions_fuzzer/startsyncremotemissions_fuzzer.cpp index a664882cc2..d591d1ca8d 100755 --- a/test/fuzztest/startsyncremotemissions_fuzzer/startsyncremotemissions_fuzzer.cpp +++ b/test/fuzztest/startsyncremotemissions_fuzzer/startsyncremotemissions_fuzzer.cpp @@ -59,7 +59,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/startuser_fuzzer/startuser_fuzzer.cpp b/test/fuzztest/startuser_fuzzer/startuser_fuzzer.cpp index ae3cfcda17..4c9cc15bbb 100644 --- a/test/fuzztest/startuser_fuzzer/startuser_fuzzer.cpp +++ b/test/fuzztest/startuser_fuzzer/startuser_fuzzer.cpp @@ -62,7 +62,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/startusertestprocess_fuzzer/startusertestprocess_fuzzer.cpp b/test/fuzztest/startusertestprocess_fuzzer/startusertestprocess_fuzzer.cpp index 87e7afaeba..49470553fd 100644 --- a/test/fuzztest/startusertestprocess_fuzzer/startusertestprocess_fuzzer.cpp +++ b/test/fuzztest/startusertestprocess_fuzzer/startusertestprocess_fuzzer.cpp @@ -90,7 +90,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/statusbardelegatemanager_fuzzer/statusbardelegatemanager_fuzzer.cpp b/test/fuzztest/statusbardelegatemanager_fuzzer/statusbardelegatemanager_fuzzer.cpp index 716f1050eb..d530dbcb6f 100644 --- a/test/fuzztest/statusbardelegatemanager_fuzzer/statusbardelegatemanager_fuzzer.cpp +++ b/test/fuzztest/statusbardelegatemanager_fuzzer/statusbardelegatemanager_fuzzer.cpp @@ -62,7 +62,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/stopserviceability_fuzzer/stopserviceability_fuzzer.cpp b/test/fuzztest/stopserviceability_fuzzer/stopserviceability_fuzzer.cpp index 5044e92b7a..1ae55e56d0 100644 --- a/test/fuzztest/stopserviceability_fuzzer/stopserviceability_fuzzer.cpp +++ b/test/fuzztest/stopserviceability_fuzzer/stopserviceability_fuzzer.cpp @@ -70,7 +70,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/stopserviceextensionability_fuzzer/stopserviceextensionability_fuzzer.cpp b/test/fuzztest/stopserviceextensionability_fuzzer/stopserviceextensionability_fuzzer.cpp index 6408bc7991..52177eb73d 100644 --- a/test/fuzztest/stopserviceextensionability_fuzzer/stopserviceextensionability_fuzzer.cpp +++ b/test/fuzztest/stopserviceextensionability_fuzzer/stopserviceextensionability_fuzzer.cpp @@ -72,7 +72,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/stopsyncremotemissions_fuzzer/stopsyncremotemissions_fuzzer.cpp b/test/fuzztest/stopsyncremotemissions_fuzzer/stopsyncremotemissions_fuzzer.cpp index 7077a6b966..d955813216 100644 --- a/test/fuzztest/stopsyncremotemissions_fuzzer/stopsyncremotemissions_fuzzer.cpp +++ b/test/fuzztest/stopsyncremotemissions_fuzzer/stopsyncremotemissions_fuzzer.cpp @@ -56,7 +56,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/stopuser_fuzzer/stopuser_fuzzer.cpp b/test/fuzztest/stopuser_fuzzer/stopuser_fuzzer.cpp index 9565d8338d..905ddf94ec 100644 --- a/test/fuzztest/stopuser_fuzzer/stopuser_fuzzer.cpp +++ b/test/fuzztest/stopuser_fuzzer/stopuser_fuzzer.cpp @@ -67,7 +67,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/systemabilitytokencallbackstub_fuzzer/systemabilitytokencallbackstub_fuzzer.cpp b/test/fuzztest/systemabilitytokencallbackstub_fuzzer/systemabilitytokencallbackstub_fuzzer.cpp index e65a3419f4..d8e8db3cfc 100644 --- a/test/fuzztest/systemabilitytokencallbackstub_fuzzer/systemabilitytokencallbackstub_fuzzer.cpp +++ b/test/fuzztest/systemabilitytokencallbackstub_fuzzer/systemabilitytokencallbackstub_fuzzer.cpp @@ -82,7 +82,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/terminateability_fuzzer/terminateability_fuzzer.cpp b/test/fuzztest/terminateability_fuzzer/terminateability_fuzzer.cpp index 08b8df296d..44c7da8ac3 100644 --- a/test/fuzztest/terminateability_fuzzer/terminateability_fuzzer.cpp +++ b/test/fuzztest/terminateability_fuzzer/terminateability_fuzzer.cpp @@ -93,7 +93,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/testobserverstub_fuzzer/testobserverstub_fuzzer.cpp b/test/fuzztest/testobserverstub_fuzzer/testobserverstub_fuzzer.cpp index 56be89e194..bd4cdbd1c6 100644 --- a/test/fuzztest/testobserverstub_fuzzer/testobserverstub_fuzzer.cpp +++ b/test/fuzztest/testobserverstub_fuzzer/testobserverstub_fuzzer.cpp @@ -79,7 +79,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) return 0; } - char *ch = (char *)malloc(size + 1); + char *ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/uiabilitylifecyclemanagera_fuzzer/uiabilitylifecyclemanagera_fuzzer.cpp b/test/fuzztest/uiabilitylifecyclemanagera_fuzzer/uiabilitylifecyclemanagera_fuzzer.cpp index 8abaa0e986..36cc285ed4 100644 --- a/test/fuzztest/uiabilitylifecyclemanagera_fuzzer/uiabilitylifecyclemanagera_fuzzer.cpp +++ b/test/fuzztest/uiabilitylifecyclemanagera_fuzzer/uiabilitylifecyclemanagera_fuzzer.cpp @@ -161,11 +161,11 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) } /* Validate the length of size */ - if (size < OHOS::U32_AT_SIZE) { + if (size < OHOS::U32_AT_SIZE) { return 0; } - char *ch = (char *)malloc(size + 1); + char *ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/uiabilitylifecyclemanagerb_fuzzer/uiabilitylifecyclemanagerb_fuzzer.cpp b/test/fuzztest/uiabilitylifecyclemanagerb_fuzzer/uiabilitylifecyclemanagerb_fuzzer.cpp index a7fb814e11..8758cf5da3 100644 --- a/test/fuzztest/uiabilitylifecyclemanagerb_fuzzer/uiabilitylifecyclemanagerb_fuzzer.cpp +++ b/test/fuzztest/uiabilitylifecyclemanagerb_fuzzer/uiabilitylifecyclemanagerb_fuzzer.cpp @@ -148,11 +148,11 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) } /* Validate the length of size */ - if (size < OHOS::U32_AT_SIZE) { + if (size < OHOS::U32_AT_SIZE) { return 0; } - char *ch = (char *)malloc(size + 1); + char *ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/uiextensionrecordfactory_fuzzer/uiextensionrecordfactory_fuzzer.cpp b/test/fuzztest/uiextensionrecordfactory_fuzzer/uiextensionrecordfactory_fuzzer.cpp index 43a99e4dea..0ac7776f5b 100644 --- a/test/fuzztest/uiextensionrecordfactory_fuzzer/uiextensionrecordfactory_fuzzer.cpp +++ b/test/fuzztest/uiextensionrecordfactory_fuzzer/uiextensionrecordfactory_fuzzer.cpp @@ -75,7 +75,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) return 0; } - char *ch = (char *)malloc(size + 1); + char *ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/unlockmissionforcleanup_fuzzer/unlockmissionforcleanup_fuzzer.cpp b/test/fuzztest/unlockmissionforcleanup_fuzzer/unlockmissionforcleanup_fuzzer.cpp index e4ace3bfef..54f29330f9 100644 --- a/test/fuzztest/unlockmissionforcleanup_fuzzer/unlockmissionforcleanup_fuzzer.cpp +++ b/test/fuzztest/unlockmissionforcleanup_fuzzer/unlockmissionforcleanup_fuzzer.cpp @@ -62,7 +62,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/unregisterabilitylifecyclecallback_fuzzer/unregisterabilitylifecyclecallback_fuzzer.cpp b/test/fuzztest/unregisterabilitylifecyclecallback_fuzzer/unregisterabilitylifecyclecallback_fuzzer.cpp index cd7e01e438..fb5285c921 100644 --- a/test/fuzztest/unregisterabilitylifecyclecallback_fuzzer/unregisterabilitylifecyclecallback_fuzzer.cpp +++ b/test/fuzztest/unregisterabilitylifecyclecallback_fuzzer/unregisterabilitylifecyclecallback_fuzzer.cpp @@ -77,7 +77,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/unregisterapplicationstateobserver_fuzzer/unregisterapplicationstateobserver_fuzzer.cpp b/test/fuzztest/unregisterapplicationstateobserver_fuzzer/unregisterapplicationstateobserver_fuzzer.cpp index f60d5248e4..c30de6a3a3 100644 --- a/test/fuzztest/unregisterapplicationstateobserver_fuzzer/unregisterapplicationstateobserver_fuzzer.cpp +++ b/test/fuzztest/unregisterapplicationstateobserver_fuzzer/unregisterapplicationstateobserver_fuzzer.cpp @@ -62,7 +62,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/unregisterenvironmentcallback_fuzzer/unregisterenvironmentcallback_fuzzer.cpp b/test/fuzztest/unregisterenvironmentcallback_fuzzer/unregisterenvironmentcallback_fuzzer.cpp index 177094a4f7..0d6ba99dfd 100644 --- a/test/fuzztest/unregisterenvironmentcallback_fuzzer/unregisterenvironmentcallback_fuzzer.cpp +++ b/test/fuzztest/unregisterenvironmentcallback_fuzzer/unregisterenvironmentcallback_fuzzer.cpp @@ -65,7 +65,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/unregistermissionlistener_fuzzer/unregistermissionlistener_fuzzer.cpp b/test/fuzztest/unregistermissionlistener_fuzzer/unregistermissionlistener_fuzzer.cpp index 80056bed69..23ae7a30f3 100644 --- a/test/fuzztest/unregistermissionlistener_fuzzer/unregistermissionlistener_fuzzer.cpp +++ b/test/fuzztest/unregistermissionlistener_fuzzer/unregistermissionlistener_fuzzer.cpp @@ -88,7 +88,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/updateconfiguration_fuzzer/updateconfiguration_fuzzer.cpp b/test/fuzztest/updateconfiguration_fuzzer/updateconfiguration_fuzzer.cpp index 371bd73d0c..ac406d284b 100644 --- a/test/fuzztest/updateconfiguration_fuzzer/updateconfiguration_fuzzer.cpp +++ b/test/fuzztest/updateconfiguration_fuzzer/updateconfiguration_fuzzer.cpp @@ -67,7 +67,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/usercallbackstub_fuzzer/usercallbackstub_fuzzer.cpp b/test/fuzztest/usercallbackstub_fuzzer/usercallbackstub_fuzzer.cpp index a5bfb07a14..f2e4f95236 100644 --- a/test/fuzztest/usercallbackstub_fuzzer/usercallbackstub_fuzzer.cpp +++ b/test/fuzztest/usercallbackstub_fuzzer/usercallbackstub_fuzzer.cpp @@ -89,7 +89,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) return 0; } - char *ch = (char *)malloc(size + 1); + char *ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/fuzztest/wantagenthelpertrigger_fuzzer/wantagenthelpertrigger_fuzzer.cpp b/test/fuzztest/wantagenthelpertrigger_fuzzer/wantagenthelpertrigger_fuzzer.cpp index 4891df6e5e..6c96b8465e 100644 --- a/test/fuzztest/wantagenthelpertrigger_fuzzer/wantagenthelpertrigger_fuzzer.cpp +++ b/test/fuzztest/wantagenthelpertrigger_fuzzer/wantagenthelpertrigger_fuzzer.cpp @@ -87,7 +87,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } - char* ch = (char*)malloc(size + 1); + char* ch = static_cast(malloc(size + 1)); if (ch == nullptr) { std::cout << "malloc failed." << std::endl; return 0; diff --git a/test/mock/frameworks_kits_appkit_native_test/include/mock_resourceManager_interface1.cpp b/test/mock/frameworks_kits_appkit_native_test/include/mock_resourceManager_interface1.cpp index f1be0b9ab7..154c1ddddf 100644 --- a/test/mock/frameworks_kits_appkit_native_test/include/mock_resourceManager_interface1.cpp +++ b/test/mock/frameworks_kits_appkit_native_test/include/mock_resourceManager_interface1.cpp @@ -52,7 +52,7 @@ public: outValue = iter->second; return SUCCESS; }; - virtual void SetStringById(uint32_t id, std::string& inValue) + void SetStringById(uint32_t id, std::string& inValue) override { if (!StringById_.empty()) { StringById_.clear(); @@ -223,7 +223,7 @@ public: outValue = iter->second; return SUCCESS; }; - virtual void SetColorById(uint32_t id, uint32_t& inValue) + void SetColorById(uint32_t id, uint32_t& inValue) override { if (!ColorById_.empty()) { ColorById_.clear(); diff --git a/test/unittest/app_mgr_service_event_handler_test/app_mgr_service_event_handler_test.cpp b/test/unittest/app_mgr_service_event_handler_test/app_mgr_service_event_handler_test.cpp index c9683dfce5..55a8158df7 100644 --- a/test/unittest/app_mgr_service_event_handler_test/app_mgr_service_event_handler_test.cpp +++ b/test/unittest/app_mgr_service_event_handler_test/app_mgr_service_event_handler_test.cpp @@ -63,8 +63,8 @@ static void WaitUntilTaskFinished(std::shared_ptr handle return; } - const uint32_t MAX_RETRY_COUNT = 1000; - const uint32_t SLEEP_TIME = 1000; + const uint32_t maxRetryCount = 1000; + const uint32_t sleepTime = 1000; uint32_t count = 0; std::atomic taskCalled(false); auto f = [&taskCalled]() { taskCalled.store(true); }; @@ -72,11 +72,11 @@ static void WaitUntilTaskFinished(std::shared_ptr handle while (!taskCalled.load()) { ++count; // if delay more than 1 second, break - if (count >= MAX_RETRY_COUNT) { + if (count >= maxRetryCount) { break; } - usleep(SLEEP_TIME); + usleep(sleepTime); } } }