ARMmbed / mbed-os-example-ble

BLE demos using mbed OS and mbed cli
Apache License 2.0
134 stars 118 forks source link

Incorrect NULL pointer check - Gatt Client Example #248

Closed deepikabhavnani closed 4 years ago

deepikabhavnani commented 5 years ago

https://github.com/ARMmbed/mbed-os-example-ble/blob/master/BLE_GattClient/source/main.cpp#L466

                                    ^
mbed-os\platform/mbed_toolchain.h(352): note: expanded from macro 'MBED_DEPRECATED'
#define MBED_DEPRECATED(M) __attribute__((deprecated(M)))
                                          ^
./source/main.cpp(466): error: comparison between pointer and integer ('GattClientProcess::DiscoveredCharacteristicNode *' and 'bool')
        if (new_node == false) {
            ~~~~~~~~ ^  ~~~~~
9 warnings and 1 error generated.
compiling main.cpp...
ciarmcom commented 5 years ago

Internal Jira reference: https://jira.arm.com/browse/MBOCUSTRIA-1347

adbridge commented 4 years ago

Apologies, this was closed in error by the automated bot - re-opening.

pan- commented 4 years ago

Fixed: https://github.com/ARMmbed/mbed-os-example-ble/blob/eaccb488a28794b5dbc8034020af91320f787f67/BLE_GattClient/source/main.cpp#L484