编译告警修改

Signed-off-by: liuyifei <liuyifei20@huawei.com>
This commit is contained in:
liuyifei
2025-06-28 01:17:57 +00:00
committed by Gitee
parent 26ca878fd8
commit 27c90da13b
2 changed files with 7 additions and 1 deletions
-1
View File
@@ -33,7 +33,6 @@ config("hilog_config") {
"-fno-common",
"-fno-strict-aliasing",
"-O2",
"-Wno-atomic-alignment",
]
}
}
+7
View File
@@ -20,6 +20,13 @@
#include "unistd.h"
#include <log.h>
#ifdef __IAR_SYSTEMS_ICC__
// IAR-specific code to ignore the warning
#pragma diag_suppress=Pe161
#else
#pragma GCC diagnostic ignored "-Watomic-alignment"
#endif
#ifndef LOSCFG_BASE_CORE_HILOG
#include <stdatomic.h>
#include "hilog_trace.h"