mirror of
https://github.com/openharmony/hiviewdfx_hievent_lite.git
synced 2026-07-01 21:54:04 -04:00
!84 merge master into master
bug: fix codex Created-by: lyj_love_code Commit-by: lyj_love_code Merged-by: openharmony_ci Description: ### 相关的Issue https://gitcode.com/openharmony/hiviewdfx_hievent_lite/issues/14 ### 原因(目的、解决的问题等) 代码不符合编码规范。 ### 描述(做了什么,变更了什么) 修改snprintf_s中打印类型为与变量无符号整数类型一致的%u。 ### 测试用例(新增、改动、可能影响的功能) NA See merge request: openharmony/hiviewdfx_hievent_lite!84
This commit is contained in:
@@ -422,11 +422,11 @@ int32 EventContentFmt(char *outStr, int32 outStrLen, const uint8 *pEvent)
|
||||
sec = time % SECONDS_PER_MINUTE;
|
||||
if (event->payload == NULL) {
|
||||
len = snprintf_s(outStr, outStrLen, outStrLen - 1,
|
||||
"EVENT: time=%02d:%02d:%02d id=%d type=%d data=null",
|
||||
"EVENT: time=%02u:%02u:%02u id=%u type=%u data=null",
|
||||
hour, mte, sec, event->common.eventId, event->type);
|
||||
} else {
|
||||
len = snprintf_s(outStr, outStrLen, outStrLen - 1,
|
||||
"EVENT: time=%02d:%02d:%02d id=%d type=%d data=%p",
|
||||
"EVENT: time=%02u:%02u:%02u id=%u type=%u data=%p",
|
||||
hour, mte, sec, event->common.eventId, event->type, event->payload);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user