Skip to content

Commit f05b23b

Browse files
committed
Fix build warnings with avr target
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent 809da46 commit f05b23b

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/ST25DVSensor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ NFCTAG_StatusTypeDef ST25DV_IO_MemWrite(const uint8_t *const pData, const uint8_
278278
_serial->print(":");
279279
_serial->println(Size);
280280
_serial->print(" ");
281-
for (int d = 0; d < Size; d++) {
281+
for (uint16_t d = 0; d < Size; d++) {
282282
sprintf(tmp, "%02X", pData[d]);
283283
_serial->print(tmp);
284284
}

src/libNDEF/lib_NDEF_Bluetooth.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,17 +121,17 @@ typedef enum {
121121
/** @brief Helper macro to set a particular EIR in the EIR mask of a `Ndef_Bluetooth_OOB_t` instance.
122122
* @param bt Pointer to a `Ndef_Bluetooth_OOB_t` struct
123123
* @param option Index of the option based on the `Ndef_Bluetooth_Eir_Types_t` */
124-
#define NDEF_BLUETOOTH_SET_OPTIONAL_MASK(bt,option) do { bt->OptionalMask |= (1<<(option)); } while (0)
124+
#define NDEF_BLUETOOTH_SET_OPTIONAL_MASK(bt,option) do { bt->OptionalMask |= ((uint32_t)1<<(option)); } while (0)
125125

126126
/** @brief Helper macro to unset a particular EIR in the EIR mask of a `Ndef_Bluetooth_OOB_t` instance.
127127
* @param bt Pointer to a `Ndef_Bluetooth_OOB_t` struct
128128
* @param option Index of the option based on the `Ndef_Bluetooth_Eir_Types_t` */
129-
#define NDEF_BLUETOOTH_UNSET_OPTIONAL_MASK(bt,option) do {bt->OptionalMask &= ~(1<<(option)); } while (0)
129+
#define NDEF_BLUETOOTH_UNSET_OPTIONAL_MASK(bt,option) do {bt->OptionalMask &= ~((uint32_t)1<<(option)); } while (0)
130130

131131
/** @brief Helper macro to know if a particular EIR is present in the EIR mask of a `Ndef_Bluetooth_OOB_t` instance.
132132
* @param bt Pointer to a `Ndef_Bluetooth_OOB_t` struct
133133
* @param option Index of the option based on the `Ndef_Bluetooth_Eir_Types_t` */
134-
#define NDEF_BLUETOOTH_GET_OPTIONAL_MASK(bt,option) ((bt->OptionalMask & (1<<(option))) >> (option))
134+
#define NDEF_BLUETOOTH_GET_OPTIONAL_MASK(bt,option) ((bt->OptionalMask & ((uint32_t)1<<(option))) >> (option))
135135

136136
/** @brief Helper macro to create a mask for a particular EIR.
137137
* @param option Index of the option based on the `Ndef_Bluetooth_Eir_Types_t` */

0 commit comments

Comments
 (0)