Skip to content

Commit 9ca91a0

Browse files
committed
fix: 🚨 修复常量判断警告及一个未使用警告
1 parent bdd33c0 commit 9ca91a0

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

core/fc_helper.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,11 @@
139139
#pragma clang diagnostic ignored "-Wmissing-field-initializers"
140140
#pragma clang diagnostic ignored "-Wmissing-declarations"
141141
#pragma clang diagnostic ignored "-Wmissing-braces"
142+
#pragma clang diagnostic ignored "-Wconstant-logical-operand"
142143
#elif __IS_COMPILER_ARM_COMPILER_5__
143144
/*! arm compiler 5 */
144145
#pragma push
145-
#pragma diag_suppress 1, 64, 174, 177, 188, 68, 513, 144, 2525
146+
#pragma diag_suppress 1, 64, 174, 177, 188, 68, 513, 144, 2525, 236
146147
#elif __IS_COMPILER_IAR__
147148
/*! IAR */
148149
#elif __IS_COMPILER_GCC__
@@ -153,6 +154,7 @@
153154
#pragma GCC diagnostic ignored "-Wformat="
154155
#pragma GCC diagnostic ignored "-Wmissing-braces"
155156
#pragma GCC diagnostic ignored "-Wmissing-declarations"
157+
#pragma GCC diagnostic ignored "-Wconstant-condition"
156158
#endif
157159

158160
// clang-format on

core/fc_port.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,8 @@ void fc_default_port_init(void)
574574
fc_port_rtt.port_in = &fc_stdin;
575575
fc_port_rtt.port_out = &fc_stdout;
576576
}
577+
578+
(void)fc_port_rtt; // 未使用也不要警告
577579
}
578580

579581
//+********************************* log组件write函数 **********************************/

0 commit comments

Comments
 (0)