[riot-commits] [RIOT-OS/RIOT] 94e314: pkg/nimble: fix `if(IS_ACTIVE(..) && CONSTANT)` wi...

benpicco noreply at github.com
Thu Sep 16 15:04:11 CEST 2021


  Branch: refs/heads/master
  Home:   https://github.com/RIOT-OS/RIOT
  Commit: 94e314c9146892b48db43c82b9f8dba8fae27d10
      https://github.com/RIOT-OS/RIOT/commit/94e314c9146892b48db43c82b9f8dba8fae27d10
  Author: Kaspar Schleiser <kaspar at schleiser.de>
  Date:   2021-09-16 (Thu, 16 Sep 2021)

  Changed paths:
    M pkg/nimble/autoadv/nimble_autoadv.c

  Log Message:
  -----------
  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.
```


  Commit: 35656d34621a9e2cd33047a442b3d16d4867e13a
      https://github.com/RIOT-OS/RIOT/commit/35656d34621a9e2cd33047a442b3d16d4867e13a
  Author: benpicco <benjamin.valentin at ml-pa.com>
  Date:   2021-09-16 (Thu, 16 Sep 2021)

  Changed paths:
    M pkg/nimble/autoadv/nimble_autoadv.c

  Log Message:
  -----------
  Merge pull request #16862 from kaspar030/fix_nimble_autoadv_isactive

pkg/nimble: fix `if(IS_ACTIVE(..) && CONSTANT)` with llvm


Compare: https://github.com/RIOT-OS/RIOT/compare/788517c61e9d...35656d34621a


More information about the commits mailing list