diff --git a/frameworks/resmgr_lite/src/global_utils.c b/frameworks/resmgr_lite/src/global_utils.c index ecd778d4666d36447c42934f5196ca15d588d869..8dd6b6bd9ba9aa8e9e7c549f2077c8f3b8b05099 100644 --- a/frameworks/resmgr_lite/src/global_utils.c +++ b/frameworks/resmgr_lite/src/global_utils.c @@ -56,7 +56,7 @@ static uint32_t GetIdHeaderOffsetByLocale(const char *locale, const Key *keys, u static int32_t GetIdHeaderByOffset(int32_t file, uint32_t offset, IdHeader *idHeader); static int32_t CheckFilePath(const char *path, char *realResourcePath, int32_t length); -static GlobalUtilsImpl g_globalUtilsImpl = { +const static GlobalUtilsImpl g_globalUtilsImpl = { .GetOffsetByLocale = GetOffsetByLocale, .GetDefaultOffsetValue = GetDefaultOffsetValue, .GetKeyValue = GetKeyValue, @@ -517,5 +517,5 @@ static int32_t GetIdHeaderByOffset(int32_t file, uint32_t offset, IdHeader *idHe GlobalUtilsImpl *GetGlobalUtilsImpl(void) { - return &g_globalUtilsImpl; + return (GlobalUtilsImpl *)(&g_globalUtilsImpl); }