Skip to content

Commit 9199a80

Browse files
committed
Fixed endless loop pragma
1 parent ef508df commit 9199a80

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/main.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
#include <nrf_delay.h>
99

1010
// nimble
11-
#pragma clang diagnostic push
12-
#pragma ide diagnostic ignored "OCInconsistentNamingInspection"
1311
#define min // workaround: nimble's min/max macros conflict with libstdc++
1412
#define max
1513
#include <controller/ble_ll.h>
@@ -59,6 +57,9 @@ Pinetime::Logging::NrfLogger logger;
5957
Pinetime::Logging::DummyLogger logger;
6058
#endif
6159

60+
#pragma clang diagnostic push
61+
#pragma ide diagnostic ignored "OCInconsistentNamingInspection"
62+
6263
static constexpr uint8_t touchPanelTwiAddress = 0x15;
6364
static constexpr uint8_t motionSensorTwiAddress = 0x18;
6465
static constexpr uint8_t heartRateSensorTwiAddress = 0x44;
@@ -161,8 +162,8 @@ Pinetime::System::SystemTask systemTask(spi,
161162
/* Variable Declarations for variables in noinit SRAM
162163
Increment NoInit_MagicValue upon adding variables to this area
163164
*/
164-
extern uint32_t __start_noinit_data;
165-
extern uint32_t __stop_noinit_data;
165+
extern uint32_t __start_noinit_data; // NOLINT(bugprone-reserved-identifier,cert-dcl37-c,cert-dcl51-cpp)
166+
extern uint32_t __stop_noinit_data; // NOLINT(bugprone-reserved-identifier,cert-dcl37-c,cert-dcl51-cpp)
166167
static constexpr uint32_t NoInit_MagicValue = 0xDEAD0000;
167168
uint32_t NoInit_MagicWord __attribute__((section(".noinit")));
168169
std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds> NoInit_BackUpTime __attribute__((section(".noinit")));
@@ -252,7 +253,7 @@ uint32_t npl_freertos_hw_enter_critical(void) {
252253
}
253254

254255
void npl_freertos_hw_exit_critical(uint32_t ctx) {
255-
if (!ctx) {
256+
if (ctx == 0u) {
256257
__enable_irq();
257258
}
258259
}
@@ -275,7 +276,7 @@ void nimble_port_run(void) {
275276
#pragma clang diagnostic pop
276277
}
277278

278-
void BleHost(void*) {
279+
void BleHost(void* /*unused*/) {
279280
nimble_port_run();
280281
}
281282

@@ -288,7 +289,7 @@ void nimble_port_init(void) {
288289
ble_store_ram_init();
289290

290291
int res;
291-
res = hal_timer_init(5, NULL);
292+
res = hal_timer_init(5, nullptr);
292293
ASSERT(res == 0);
293294
res = os_cputime_init(32768);
294295
ASSERT(res == 0);
@@ -348,5 +349,4 @@ void nimble_port_ll_task_func(void* args) {
348349
APP_ERROR_HANDLER(NRF_ERROR_FORBIDDEN);
349350
}
350351
}
351-
352-
#pragma clang diagnostic pop
352+
#pragma clang diagnostic pop // This is for OCInconsistentNamingInspection

0 commit comments

Comments
 (0)