From ce514daac306941a3e94e2b462771f81a2a7a17c Mon Sep 17 00:00:00 2001 From: chen Date: Mon, 14 Mar 2022 16:03:43 +0800 Subject: [PATCH] code review Signed-off-by: chen Change-Id: Ica153bbb24f904e931a62f62771502b7c029b3d6 --- .../native/source/system_ability_load_callback_stub.cpp | 2 +- services/common/test/unittest/parse_util_test.cpp | 6 +++--- .../samgr/native/source/system_ability_manager_stub.cpp | 4 ++-- .../native/test/unittest/src/itest_transaction_service.cpp | 4 ++-- test/resource/profile/invalid_root.xml | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/frameworks/native/source/system_ability_load_callback_stub.cpp b/frameworks/native/source/system_ability_load_callback_stub.cpp index 05416258..94723446 100755 --- a/frameworks/native/source/system_ability_load_callback_stub.cpp +++ b/frameworks/native/source/system_ability_load_callback_stub.cpp @@ -23,7 +23,7 @@ namespace OHOS { int32_t SystemAbilityLoadCallbackStub::OnRemoteRequest(uint32_t code, MessageParcel& data, MessageParcel& reply, MessageOption& option) { - HILOGI("SystemAbilityLoadCallbackStub::OnRemoteRequest, code = %{public}d", code); + HILOGI("SystemAbilityLoadCallbackStub::OnRemoteRequest, code = %{public}u", code); if (!EnforceInterceToken(data)) { HILOGW("SystemAbilityLoadCallbackStub::OnRemoteRequest check interface token failed!"); return ERR_PERMISSION_DENIED; diff --git a/services/common/test/unittest/parse_util_test.cpp b/services/common/test/unittest/parse_util_test.cpp index 8792bfec..3bffbb06 100755 --- a/services/common/test/unittest/parse_util_test.cpp +++ b/services/common/test/unittest/parse_util_test.cpp @@ -357,7 +357,7 @@ HWTEST_F(ParseUtilTest, RemoveSaProfile003, TestSize.Level1) EXPECT_EQ(profiles.size(), 4); /** * @tc.steps: step2. remove one existed id - * @tc.expected: step2. remove successed + * @tc.expected: step2. remove successfully */ parser_->RemoveSaProfile(9999); profiles = parser_->GetAllSaProfiles(); @@ -383,7 +383,7 @@ HWTEST_F(ParseUtilTest, RemoveSaProfile004, TestSize.Level1) EXPECT_EQ(profiles.size(), 4); /** * @tc.steps: step2. remove one existed id - * @tc.expected: step2. remove successed + * @tc.expected: step2. remove successfully */ parser_->RemoveSaProfile(9997); profiles = parser_->GetAllSaProfiles(); @@ -409,7 +409,7 @@ HWTEST_F(ParseUtilTest, RemoveSaProfile005, TestSize.Level1) EXPECT_EQ(profiles.size(), 4); /** * @tc.steps: step2. remove more existed id - * @tc.expected: step2. remove successed + * @tc.expected: step2. remove successfully */ parser_->RemoveSaProfile(9997); parser_->RemoveSaProfile(9998); diff --git a/services/samgr/native/source/system_ability_manager_stub.cpp b/services/samgr/native/source/system_ability_manager_stub.cpp index 62892d1b..c86f9046 100644 --- a/services/samgr/native/source/system_ability_manager_stub.cpp +++ b/services/samgr/native/source/system_ability_manager_stub.cpp @@ -57,11 +57,11 @@ SystemAbilityManagerStub::SystemAbilityManagerStub() int32_t SystemAbilityManagerStub::OnRemoteRequest(uint32_t code, MessageParcel& data, MessageParcel& reply, MessageOption &option) { - HILOGI("SystemAbilityManagerStub::OnReceived, code = %{public}d, flags= %{public}d", + HILOGI("SystemAbilityManagerStub::OnReceived, code = %{public}u, flags= %{public}d", code, option.GetFlags()); if (code != GET_SYSTEM_ABILITY_TRANSACTION && code != CHECK_SYSTEM_ABILITY_TRANSACTION) { if (!EnforceInterceToken(data)) { - HILOGI("SystemAbilityManagerStub::OnReceived, code = %{public}d, check interfaceToken failed", code); + HILOGI("SystemAbilityManagerStub::OnReceived, code = %{public}u, check interfaceToken failed", code); return ERR_PERMISSION_DENIED; } } diff --git a/services/samgr/native/test/unittest/src/itest_transaction_service.cpp b/services/samgr/native/test/unittest/src/itest_transaction_service.cpp index a2b9ce04..98157177 100755 --- a/services/samgr/native/test/unittest/src/itest_transaction_service.cpp +++ b/services/samgr/native/test/unittest/src/itest_transaction_service.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -46,7 +46,7 @@ int32_t TestTransactionServiceProxy::ReverseInt(int32_t data, int32_t& rep) int32_t TestTransactionServiceStub::OnRemoteRequest(uint32_t code, MessageParcel& data, MessageParcel& reply, MessageOption& option) { - HILOGI("TestTransactionServiceStub::OnRemoteRequest, code = %d, flags = %d", code, option.GetFlags()); + HILOGI("TestTransactionServiceStub::OnRemoteRequest, code = %u, flags = %d", code, option.GetFlags()); switch (code) { case REVERSE_INT: { int32_t result = 0; diff --git a/test/resource/profile/invalid_root.xml b/test/resource/profile/invalid_root.xml index 9b747a63..a588fb26 100755 --- a/test/resource/profile/invalid_root.xml +++ b/test/resource/profile/invalid_root.xml @@ -16,11 +16,11 @@ liboos_ability.z.so - + 1492 liboos_ability.z.so - + true true 1 -- Gitee