pkg/nimble: fix if(IS_ACTIVE(..) && CONSTANT) with llvm
Fixes
```
/home/kaspar/src/riot.rs/pkg/nimble/autoadv/nimble_autoadv.c:163:46: error: use of logical '&&' with constant operand [-Werror,-Wconstant-logical-operand]
if (IS_ACTIVE(NIMBLE_AUTOADV_FLAG_FIELD) && BLUETIL_AD_FLAGS_DEFAULT) {
^ ~~~~~~~~~~~~~~~~~~~~~~~~
/home/kaspar/src/riot.rs/pkg/nimble/autoadv/nimble_autoadv.c:163:46: note: use '&' for a bitwise operation
if (IS_ACTIVE(NIMBLE_AUTOADV_FLAG_FIELD) && BLUETIL_AD_FLAGS_DEFAULT) {
^~
&
/home/kaspar/src/riot.rs/pkg/nimble/autoadv/nimble_autoadv.c:163:46: note: remove constant to silence this warning
if (IS_ACTIVE(NIMBLE_AUTOADV_FLAG_FIELD) && BLUETIL_AD_FLAGS_DEFAULT) {
~^~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
```
This commit is contained in:
parent
6c739935d8
commit
94e314c914
@ -160,7 +160,7 @@ void nimble_autoadv_reset(void)
|
|||||||
int rc = 0;
|
int rc = 0;
|
||||||
(void) rc;
|
(void) rc;
|
||||||
|
|
||||||
if (IS_ACTIVE(NIMBLE_AUTOADV_FLAG_FIELD) && BLUETIL_AD_FLAGS_DEFAULT) {
|
if (IS_ACTIVE(NIMBLE_AUTOADV_FLAG_FIELD) && BLUETIL_AD_FLAGS_DEFAULT != 0) {
|
||||||
rc = bluetil_ad_init_with_flags(&_ad, buf, sizeof(buf),
|
rc = bluetil_ad_init_with_flags(&_ad, buf, sizeof(buf),
|
||||||
BLUETIL_AD_FLAGS_DEFAULT);
|
BLUETIL_AD_FLAGS_DEFAULT);
|
||||||
assert(rc == BLUETIL_AD_OK);
|
assert(rc == BLUETIL_AD_OK);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user