File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11/*
2+ * SPDX-FileCopyrightText: 2018 Sam Kumar
23 * SPDX-License-Identifier: LGPL-2.1-only
34 */
45
Original file line number Diff line number Diff line change @@ -173,15 +173,15 @@ static inline uint8_t bitarithm_clzb(uint8_t x)
173173{
174174#if defined(BITARITHM_HAS_CLZ )
175175 /* clz operates on `unsigned int`, so `x` will be promoted to the size
176- of an `unsigned int` */
176+ * of an `unsigned int` */
177177 return __builtin_clz (x ) - 8 * (sizeof (unsigned ) - 1 );
178178#else
179- uint8_t l = 0 ;
179+ uint8_t number = 0 ;
180180 while (!(x & 0x80 )) {
181- ++ l ;
181+ ++ number ;
182182 x <<= 1 ;
183183 }
184- return l ;
184+ return number ;
185185#endif
186186}
187187
Original file line number Diff line number Diff line change @@ -86,13 +86,19 @@ enum {
8686 */
8787#ifdef __clang__ /* following pragmas required for clang 3.8.0 */
8888#define LOG (level , ...) do { \
89- _Pragma("clang diagnostic push") \
90- _Pragma("clang diagnostic ignored \"-Wtautological-compare\"") \
91- if ((level) <= LOG_LEVEL) LOG_WRITE((level), __VA_ARGS__); } while (0U) \
89+ _Pragma("clang diagnostic push") \
90+ _Pragma("clang diagnostic ignored \"-Wtautological-compare\"") \
91+ if ((level) <= LOG_LEVEL) { \
92+ LOG_WRITE((level), __VA_ARGS__); \
93+ } \
94+ } while (0U) \
9295 _Pragma("clang diagnostic pop")
9396#else
9497#define LOG (level , ...) do { \
95- if ((level) <= LOG_LEVEL) LOG_WRITE((level), __VA_ARGS__); } while (0U)
98+ if ((level) <= LOG_LEVEL) { \
99+ LOG_WRITE((level), __VA_ARGS__); \
100+ } \
101+ } while (0U)
96102#endif /* __clang__ */
97103
98104/**
You can’t perform that action at this time.
0 commit comments