From 02fd6bcb286f2f5f34492ed47865c80e357ccb12 Mon Sep 17 00:00:00 2001 From: laiguizhong Date: Tue, 4 Jan 2022 14:25:21 +0800 Subject: [PATCH] change %llu to %"PRIu64" Signed-off-by: laiguizhong Change-Id: I393dbfe279fe16ecd4a2a6de35351d15d19bbd06 --- dm/src/display_manager.cpp | 5 ++++- dmserver/src/display_manager_proxy.cpp | 3 ++- dmserver/src/display_manager_service_inner.cpp | 3 ++- .../kits/napi/display/native_display_module.cpp | 7 +++++-- sa_profile/4606.xml | 2 +- sa_profile/{4605.xml => 4607.xml} | 2 +- sa_profile/BUILD.gn | 2 +- wmtest/dm/src/display_manager.cpp | 5 ++++- wmtest/dmserver/src/display_manager_proxy.cpp | 3 ++- .../dmserver/src/display_manager_service_inner.cpp | 3 ++- .../kits/napi/display/native_display_module.cpp | 7 +++++-- wmtest/test/dm_native_test.cpp | 12 +++++++----- 12 files changed, 36 insertions(+), 18 deletions(-) rename sa_profile/{4605.xml => 4607.xml} (96%) diff --git a/dm/src/display_manager.cpp b/dm/src/display_manager.cpp index 57b8ac1b0a..8c6c34fee2 100644 --- a/dm/src/display_manager.cpp +++ b/dm/src/display_manager.cpp @@ -14,6 +14,9 @@ */ #include "display_manager.h" + +#include + #include "display_manager_adapter.h" #include "window_manager_hilog.h" @@ -89,7 +92,7 @@ std::vector> DisplayManager::GetAllDisplays() if (display != nullptr) { res.push_back(display); } else { - WLOGFE("DisplayManager::GetAllDisplays display %llu nullptr!", displayId); + WLOGFE("DisplayManager::GetAllDisplays display %" PRIu64" nullptr!", displayId); } } return res; diff --git a/dmserver/src/display_manager_proxy.cpp b/dmserver/src/display_manager_proxy.cpp index 87c482a3e6..a286f6fae4 100644 --- a/dmserver/src/display_manager_proxy.cpp +++ b/dmserver/src/display_manager_proxy.cpp @@ -15,6 +15,7 @@ #include "display_manager_proxy.h" +#include #include #include "window_manager_hilog.h" @@ -69,7 +70,7 @@ DisplayId DisplayManagerProxy::GetDefaultDisplayId() } DisplayId displayId = reply.ReadUint64(); - WLOGFI("DisplayManagerProxy::GetDefaultDisplayId %llu", displayId); + WLOGFI("DisplayManagerProxy::GetDefaultDisplayId %" PRIu64"", displayId); return displayId; } diff --git a/dmserver/src/display_manager_service_inner.cpp b/dmserver/src/display_manager_service_inner.cpp index 61a9c3f6f8..9b53ac1cfb 100644 --- a/dmserver/src/display_manager_service_inner.cpp +++ b/dmserver/src/display_manager_service_inner.cpp @@ -16,6 +16,7 @@ #include "display_manager_service_inner.h" #include +#include #include #include @@ -81,7 +82,7 @@ std::vector> DisplayManagerServiceInner::GetAllDisplay if (display != nullptr) { res.push_back(display); } else { - WLOGFE("GetAllDisplays display %llu nullptr!", displayId); + WLOGFE("GetAllDisplays display %" PRIu64" nullptr!", displayId); } } return res; diff --git a/interfaces/kits/napi/display/native_display_module.cpp b/interfaces/kits/napi/display/native_display_module.cpp index 613ffaa0de..127326b9e4 100644 --- a/interfaces/kits/napi/display/native_display_module.cpp +++ b/interfaces/kits/napi/display/native_display_module.cpp @@ -13,8 +13,11 @@ * limitations under the License. */ -#include "display_manager.h" #include "native_display_module.h" + +#include + +#include "display_manager.h" #include "wm_common.h" #include "wm_napi_common.h" @@ -40,7 +43,7 @@ void Async(napi_env env, std::unique_ptr ¶m) param->wret = WMError::WM_ERROR_NULLPTR; return; } - GNAPI_LOG("GetDefaultDisplay: id %llu, w %d, h %d", + GNAPI_LOG("GetDefaultDisplay: id %" PRIu64", w %d, h %d", param->display->GetId(), param->display->GetWidth(), param->display->GetHeight()); param->wret = WMError::WM_OK; } diff --git a/sa_profile/4606.xml b/sa_profile/4606.xml index 7a02c334da..aa72488179 100644 --- a/sa_profile/4606.xml +++ b/sa_profile/4606.xml @@ -23,4 +23,4 @@ false 1 - + \ No newline at end of file diff --git a/sa_profile/4605.xml b/sa_profile/4607.xml similarity index 96% rename from sa_profile/4605.xml rename to sa_profile/4607.xml index 9197521b84..79bb9b4df0 100644 --- a/sa_profile/4605.xml +++ b/sa_profile/4607.xml @@ -15,7 +15,7 @@ foundation - 4605 + 4607 libwms.z.so diff --git a/sa_profile/BUILD.gn b/sa_profile/BUILD.gn index f3a586d781..616acf799e 100644 --- a/sa_profile/BUILD.gn +++ b/sa_profile/BUILD.gn @@ -15,8 +15,8 @@ import("//build/ohos/sa_profile/sa_profile.gni") ohos_sa_profile("wms_sa_profile") { sources = [ - "4605.xml", "4606.xml", + "4607.xml", ] part_name = "window_manager" } diff --git a/wmtest/dm/src/display_manager.cpp b/wmtest/dm/src/display_manager.cpp index 57b8ac1b0a..8c6c34fee2 100644 --- a/wmtest/dm/src/display_manager.cpp +++ b/wmtest/dm/src/display_manager.cpp @@ -14,6 +14,9 @@ */ #include "display_manager.h" + +#include + #include "display_manager_adapter.h" #include "window_manager_hilog.h" @@ -89,7 +92,7 @@ std::vector> DisplayManager::GetAllDisplays() if (display != nullptr) { res.push_back(display); } else { - WLOGFE("DisplayManager::GetAllDisplays display %llu nullptr!", displayId); + WLOGFE("DisplayManager::GetAllDisplays display %" PRIu64" nullptr!", displayId); } } return res; diff --git a/wmtest/dmserver/src/display_manager_proxy.cpp b/wmtest/dmserver/src/display_manager_proxy.cpp index 87c482a3e6..a286f6fae4 100644 --- a/wmtest/dmserver/src/display_manager_proxy.cpp +++ b/wmtest/dmserver/src/display_manager_proxy.cpp @@ -15,6 +15,7 @@ #include "display_manager_proxy.h" +#include #include #include "window_manager_hilog.h" @@ -69,7 +70,7 @@ DisplayId DisplayManagerProxy::GetDefaultDisplayId() } DisplayId displayId = reply.ReadUint64(); - WLOGFI("DisplayManagerProxy::GetDefaultDisplayId %llu", displayId); + WLOGFI("DisplayManagerProxy::GetDefaultDisplayId %" PRIu64"", displayId); return displayId; } diff --git a/wmtest/dmserver/src/display_manager_service_inner.cpp b/wmtest/dmserver/src/display_manager_service_inner.cpp index 61a9c3f6f8..9b53ac1cfb 100644 --- a/wmtest/dmserver/src/display_manager_service_inner.cpp +++ b/wmtest/dmserver/src/display_manager_service_inner.cpp @@ -16,6 +16,7 @@ #include "display_manager_service_inner.h" #include +#include #include #include @@ -81,7 +82,7 @@ std::vector> DisplayManagerServiceInner::GetAllDisplay if (display != nullptr) { res.push_back(display); } else { - WLOGFE("GetAllDisplays display %llu nullptr!", displayId); + WLOGFE("GetAllDisplays display %" PRIu64" nullptr!", displayId); } } return res; diff --git a/wmtest/interfaces/kits/napi/display/native_display_module.cpp b/wmtest/interfaces/kits/napi/display/native_display_module.cpp index 613ffaa0de..127326b9e4 100644 --- a/wmtest/interfaces/kits/napi/display/native_display_module.cpp +++ b/wmtest/interfaces/kits/napi/display/native_display_module.cpp @@ -13,8 +13,11 @@ * limitations under the License. */ -#include "display_manager.h" #include "native_display_module.h" + +#include + +#include "display_manager.h" #include "wm_common.h" #include "wm_napi_common.h" @@ -40,7 +43,7 @@ void Async(napi_env env, std::unique_ptr ¶m) param->wret = WMError::WM_ERROR_NULLPTR; return; } - GNAPI_LOG("GetDefaultDisplay: id %llu, w %d, h %d", + GNAPI_LOG("GetDefaultDisplay: id %" PRIu64", w %d, h %d", param->display->GetId(), param->display->GetWidth(), param->display->GetHeight()); param->wret = WMError::WM_OK; } diff --git a/wmtest/test/dm_native_test.cpp b/wmtest/test/dm_native_test.cpp index 3373ab11ed..8bd616a8ef 100644 --- a/wmtest/test/dm_native_test.cpp +++ b/wmtest/test/dm_native_test.cpp @@ -16,7 +16,9 @@ #include "dm_native_test.h" #include +#include #include + #include "wm_common.h" #include "display_manager.h" #include "singleton_container.h" @@ -61,13 +63,13 @@ void DMNativeTest::Run(int32_t argc, const char **argv) } DisplayId displayId = dms->GetDefaultDisplayId(); - printf("defaultDisplayId: %llu\n", displayId); + printf("defaultDisplayId: %" PRIu64"\n", displayId); auto display = dms->GetDefaultDisplay(); if (display == nullptr) { printf("GetDefaultDisplay: failed!\n"); } else { - printf("GetDefaultDisplay: id %llu, w %d, h %d, fps %u\n", display->GetId(), display->GetWidth(), + printf("GetDefaultDisplay: id %" PRIu64", w %d, h %d, fps %u\n", display->GetId(), display->GetWidth(), display->GetHeight(), display->GetFreshRate()); } @@ -75,9 +77,9 @@ void DMNativeTest::Run(int32_t argc, const char **argv) for (auto id: ids) { display = dms->GetDisplayById(displayId); if (display == nullptr) { - printf("GetDisplayById(%llu): failed!\n", id); + printf("GetDisplayById(%" PRIu64"): failed!\n", id); } else { - printf("GetDisplayById(%llu): id %llu, w %d, h %d, fps %u\n", id, display->GetId(), display->GetWidth(), + printf("GetDisplayById(%" PRIu64"): id %" PRIu64", w %d, h %d, fps %u\n", id, display->GetId(), display->GetWidth(), display->GetHeight(), display->GetFreshRate()); } } @@ -87,7 +89,7 @@ void DMNativeTest::Run(int32_t argc, const char **argv) if (disp == nullptr) { printf("GetAllDisplays: failed!\n"); } else { - printf("GetAllDisplays: id %llu, w %d, h %d, fps %u\n", disp->GetId(), disp->GetWidth(), + printf("GetAllDisplays: id %" PRIu64", w %d, h %d, fps %u\n", disp->GetId(), disp->GetWidth(), disp->GetHeight(), disp->GetFreshRate()); } } -- Gitee