add empty (void) declarations for unused variables. This avoids warnings.
I could have used the compiler-polyfill module, but I wanted to avoid creating that dependency.
This commit is contained in:
parent
8846107b5c
commit
163f9e010a
4 changed files with 132 additions and 3 deletions
51
ble/Gap.h
51
ble/Gap.h
|
@ -154,6 +154,10 @@ public:
|
|||
* @return BLE_ERROR_NONE on success.
|
||||
*/
|
||||
virtual ble_error_t setAddress(AddressType_t type, const Address_t address) {
|
||||
/* avoid compiler warnings about unused variables */
|
||||
(void)type;
|
||||
(void)address;
|
||||
|
||||
return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
|
||||
}
|
||||
|
||||
|
@ -163,6 +167,10 @@ public:
|
|||
* @return BLE_ERROR_NONE on success.
|
||||
*/
|
||||
virtual ble_error_t getAddress(AddressType_t *typeP, Address_t address) {
|
||||
/* avoid compiler warnings about unused variables */
|
||||
(void)typeP;
|
||||
(void)address;
|
||||
|
||||
return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
|
||||
}
|
||||
|
||||
|
@ -219,6 +227,12 @@ public:
|
|||
Gap::AddressType_t peerAddrType,
|
||||
const ConnectionParams_t *connectionParams,
|
||||
const GapScanningParams *scanParams) {
|
||||
/* avoid compiler warnings about unused variables */
|
||||
(void)peerAddr;
|
||||
(void)peerAddrType;
|
||||
(void)connectionParams;
|
||||
(void)scanParams;
|
||||
|
||||
return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
|
||||
}
|
||||
|
||||
|
@ -231,6 +245,10 @@ public:
|
|||
* The reason for disconnection to be sent back to the peer.
|
||||
*/
|
||||
virtual ble_error_t disconnect(Handle_t connectionHandle, DisconnectionReason_t reason) {
|
||||
/* avoid compiler warnings about unused variables */
|
||||
(void)connectionHandle;
|
||||
(void)reason;
|
||||
|
||||
return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
|
||||
}
|
||||
|
||||
|
@ -248,6 +266,9 @@ public:
|
|||
* altertive which takes a connection handle. It will be dropped in the future.
|
||||
*/
|
||||
virtual ble_error_t disconnect(DisconnectionReason_t reason) {
|
||||
/* avoid compiler warnings about unused variables */
|
||||
(void)reason;
|
||||
|
||||
return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
|
||||
}
|
||||
|
||||
|
@ -264,6 +285,9 @@ public:
|
|||
* the given structure pointed to by params.
|
||||
*/
|
||||
virtual ble_error_t getPreferredConnectionParams(ConnectionParams_t *params) {
|
||||
/* avoid compiler warnings about unused variables */
|
||||
(void)params;
|
||||
|
||||
return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
|
||||
}
|
||||
|
||||
|
@ -276,6 +300,9 @@ public:
|
|||
* The structure containing the desired parameters.
|
||||
*/
|
||||
virtual ble_error_t setPreferredConnectionParams(const ConnectionParams_t *params) {
|
||||
/* avoid compiler warnings about unused variables */
|
||||
(void)params;
|
||||
|
||||
return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
|
||||
}
|
||||
|
||||
|
@ -290,6 +317,10 @@ public:
|
|||
* the parameters in the PPCP characteristic of the GAP service will be used instead.
|
||||
*/
|
||||
virtual ble_error_t updateConnectionParams(Handle_t handle, const ConnectionParams_t *params) {
|
||||
/* avoid compiler warnings about unused variables */
|
||||
(void)handle;
|
||||
(void)params;
|
||||
|
||||
return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
|
||||
}
|
||||
|
||||
|
@ -299,6 +330,9 @@ public:
|
|||
* The new value for the device-name. This is a UTF-8 encoded, <b>NULL-terminated</b> string.
|
||||
*/
|
||||
virtual ble_error_t setDeviceName(const uint8_t *deviceName) {
|
||||
/* avoid compiler warnings about unused variables */
|
||||
(void)deviceName;
|
||||
|
||||
return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
|
||||
}
|
||||
|
||||
|
@ -321,6 +355,10 @@ public:
|
|||
* use this information to retry with a suitable buffer size.
|
||||
*/
|
||||
virtual ble_error_t getDeviceName(uint8_t *deviceName, unsigned *lengthP) {
|
||||
/* avoid compiler warnings about unused variables */
|
||||
(void)deviceName;
|
||||
(void)lengthP;
|
||||
|
||||
return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
|
||||
}
|
||||
|
||||
|
@ -330,6 +368,9 @@ public:
|
|||
* The new value for the device-appearance.
|
||||
*/
|
||||
virtual ble_error_t setAppearance(GapAdvertisingData::Appearance appearance) {
|
||||
/* avoid compiler warnings about unused variables */
|
||||
(void)appearance;
|
||||
|
||||
return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
|
||||
}
|
||||
|
||||
|
@ -339,6 +380,9 @@ public:
|
|||
* The new value for the device-appearance.
|
||||
*/
|
||||
virtual ble_error_t getAppearance(GapAdvertisingData::Appearance *appearanceP) {
|
||||
/* avoid compiler warnings about unused variables */
|
||||
(void)appearanceP;
|
||||
|
||||
return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
|
||||
}
|
||||
|
||||
|
@ -347,6 +391,9 @@ public:
|
|||
* @param[in] txPower Radio transmit power in dBm.
|
||||
*/
|
||||
virtual ble_error_t setTxPower(int8_t txPower) {
|
||||
/* avoid compiler warnings about unused variables */
|
||||
(void)txPower;
|
||||
|
||||
return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
|
||||
}
|
||||
|
||||
|
@ -359,6 +406,10 @@ public:
|
|||
* Out parameter to receive the array's size.
|
||||
*/
|
||||
virtual void getPermittedTxPowerValues(const int8_t **valueArrayPP, size_t *countP) {
|
||||
/* avoid compiler warnings about unused variables */
|
||||
(void)valueArrayPP;
|
||||
(void)countP;
|
||||
|
||||
*countP = 0; /* default implementation; override this API if this capability is supported. */
|
||||
}
|
||||
|
||||
|
|
|
@ -97,6 +97,13 @@ public:
|
|||
ServiceDiscovery::CharacteristicCallback_t cc = NULL,
|
||||
const UUID &matchingServiceUUID = UUID::ShortUUIDBytes_t(BLE_UUID_UNKNOWN),
|
||||
const UUID &matchingCharacteristicUUIDIn = UUID::ShortUUIDBytes_t(BLE_UUID_UNKNOWN)) {
|
||||
/* avoid compiler warnings about unused variables */
|
||||
(void)connectionHandle;
|
||||
(void)sc;
|
||||
(void)cc;
|
||||
(void)matchingServiceUUID;
|
||||
(void)matchingCharacteristicUUIDIn;
|
||||
|
||||
return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
|
||||
}
|
||||
|
||||
|
@ -129,6 +136,11 @@ public:
|
|||
virtual ble_error_t discoverServices(Gap::Handle_t connectionHandle,
|
||||
ServiceDiscovery::ServiceCallback_t callback,
|
||||
const UUID &matchingServiceUUID = UUID::ShortUUIDBytes_t(BLE_UUID_UNKNOWN)) {
|
||||
/* avoid compiler warnings about unused variables */
|
||||
(void)connectionHandle;
|
||||
(void)callback;
|
||||
(void)matchingServiceUUID;
|
||||
|
||||
return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
|
||||
}
|
||||
|
||||
|
@ -160,6 +172,12 @@ public:
|
|||
ServiceDiscovery::ServiceCallback_t callback,
|
||||
GattAttribute::Handle_t startHandle,
|
||||
GattAttribute::Handle_t endHandle) {
|
||||
/* avoid compiler warnings about unused variables */
|
||||
(void)connectionHandle;
|
||||
(void)callback;
|
||||
(void)startHandle;
|
||||
(void)endHandle;
|
||||
|
||||
return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
|
||||
}
|
||||
|
||||
|
@ -180,6 +198,11 @@ public:
|
|||
|
||||
/* Initiate a Gatt Client read procedure by attribute-handle. */
|
||||
virtual ble_error_t read(Gap::Handle_t connHandle, GattAttribute::Handle_t attributeHandle, uint16_t offset) const {
|
||||
/* avoid compiler warnings about unused variables */
|
||||
(void)connHandle;
|
||||
(void)attributeHandle;
|
||||
(void)offset;
|
||||
|
||||
return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
|
||||
}
|
||||
|
||||
|
@ -204,6 +227,13 @@ public:
|
|||
GattAttribute::Handle_t attributeHandle,
|
||||
size_t length,
|
||||
const uint8_t *value) const {
|
||||
/* avoid compiler warnings about unused variables */
|
||||
(void)cmd;
|
||||
(void)connHandle;
|
||||
(void)attributeHandle;
|
||||
(void)length;
|
||||
(void)value;
|
||||
|
||||
return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
|
||||
}
|
||||
|
||||
|
@ -228,6 +258,8 @@ public:
|
|||
* Setup callback for when serviceDiscovery terminates.
|
||||
*/
|
||||
virtual void onServiceDiscoveryTermination(ServiceDiscovery::TerminationCallback_t callback) {
|
||||
(void)callback; /* avoid compiler warnings about ununsed variables */
|
||||
|
||||
/* default implementation; override this API if this capability is supported. */
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,10 @@ public:
|
|||
* Add a service declaration to the local server ATT table. Also add the
|
||||
* characteristics contained within.
|
||||
*/
|
||||
virtual ble_error_t addService(GattService &) {
|
||||
virtual ble_error_t addService(GattService &service) {
|
||||
/* avoid compiler warnings about unused variables */
|
||||
(void)service;
|
||||
|
||||
return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
|
||||
}
|
||||
|
||||
|
@ -72,6 +75,11 @@ public:
|
|||
* @return BLE_ERROR_NONE if a value was read successfully into the buffer.
|
||||
*/
|
||||
virtual ble_error_t read(GattAttribute::Handle_t attributeHandle, uint8_t buffer[], uint16_t *lengthP) {
|
||||
/* avoid compiler warnings about unused variables */
|
||||
(void)attributeHandle;
|
||||
(void)buffer;
|
||||
(void)lengthP;
|
||||
|
||||
return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
|
||||
}
|
||||
|
||||
|
@ -97,6 +105,12 @@ public:
|
|||
* attributes (such as the CCCDs).
|
||||
*/
|
||||
virtual ble_error_t read(Gap::Handle_t connectionHandle, GattAttribute::Handle_t attributeHandle, uint8_t *buffer, uint16_t *lengthP) {
|
||||
/* avoid compiler warnings about unused variables */
|
||||
(void)connectionHandle;
|
||||
(void)attributeHandle;
|
||||
(void)buffer;
|
||||
(void)lengthP;
|
||||
|
||||
return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
|
||||
}
|
||||
|
||||
|
@ -118,7 +132,13 @@ public:
|
|||
*
|
||||
* @return BLE_ERROR_NONE if we have successfully set the value of the attribute.
|
||||
*/
|
||||
virtual ble_error_t write(GattAttribute::Handle_t, const uint8_t *, uint16_t, bool localOnly = false) {
|
||||
virtual ble_error_t write(GattAttribute::Handle_t attributeHandle, const uint8_t *value, uint16_t size, bool localOnly = false) {
|
||||
/* avoid compiler warnings about unused variables */
|
||||
(void)attributeHandle;
|
||||
(void)value;
|
||||
(void)size;
|
||||
(void)localOnly;
|
||||
|
||||
return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
|
||||
}
|
||||
|
||||
|
@ -144,7 +164,14 @@ public:
|
|||
*
|
||||
* @return BLE_ERROR_NONE if we have successfully set the value of the attribute.
|
||||
*/
|
||||
virtual ble_error_t write(Gap::Handle_t connectionHandle, GattAttribute::Handle_t, const uint8_t *, uint16_t, bool localOnly = false) {
|
||||
virtual ble_error_t write(Gap::Handle_t connectionHandle, GattAttribute::Handle_t attributeHandle, const uint8_t *value, uint16_t size, bool localOnly = false) {
|
||||
/* avoid compiler warnings about unused variables */
|
||||
(void)connectionHandle;
|
||||
(void)attributeHandle;
|
||||
(void)value;
|
||||
(void)size;
|
||||
(void)localOnly;
|
||||
|
||||
return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
|
||||
}
|
||||
|
||||
|
@ -159,6 +186,10 @@ public:
|
|||
* @return BLE_ERROR_NONE if the connection and handle are found. false otherwise.
|
||||
*/
|
||||
virtual ble_error_t areUpdatesEnabled(const GattCharacteristic &characteristic, bool *enabledP) {
|
||||
/* avoid compiler warnings about unused variables */
|
||||
(void)characteristic;
|
||||
(void)enabledP;
|
||||
|
||||
return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
|
||||
}
|
||||
|
||||
|
@ -176,6 +207,11 @@ public:
|
|||
* @return BLE_ERROR_NONE if the connection and handle are found. false otherwise.
|
||||
*/
|
||||
virtual ble_error_t areUpdatesEnabled(Gap::Handle_t connectionHandle, const GattCharacteristic &characteristic, bool *enabledP) {
|
||||
/* avoid compiler warnings about unused variables */
|
||||
(void)connectionHandle;
|
||||
(void)characteristic;
|
||||
(void)enabledP;
|
||||
|
||||
return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
|
||||
}
|
||||
|
||||
|
|
|
@ -105,6 +105,12 @@ public:
|
|||
bool requireMITM = true,
|
||||
SecurityIOCapabilities_t iocaps = IO_CAPS_NONE,
|
||||
const Passkey_t passkey = NULL) {
|
||||
/* avoid compiler warnings about unused variables */
|
||||
(void)enableBonding;
|
||||
(void)requireMITM;
|
||||
(void)iocaps;
|
||||
(void)passkey;
|
||||
|
||||
return BLE_ERROR_NOT_IMPLEMENTED; /* default implementation; override this if security is supported. */
|
||||
}
|
||||
|
||||
|
@ -117,6 +123,10 @@ public:
|
|||
* @return BLE_SUCCESS Or appropriate error code indicating reason for failure.
|
||||
*/
|
||||
virtual ble_error_t getLinkSecurity(Gap::Handle_t connectionHandle, LinkSecurityStatus_t *securityStatusP) {
|
||||
/* avoid compiler warnings about unused variables */
|
||||
(void)connectionHandle;
|
||||
(void)securityStatusP;
|
||||
|
||||
return BLE_ERROR_NOT_IMPLEMENTED; /* default implementation; override this if security is supported. */
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue