Fix warning about garbage value
acr122s.c:196:23: warning: The left operand of '<<' is a garbage value size_t frame_size = FRAME_SIZE(frame); ^ ~~~~~~ acr122s.c:76:24: note: expanded from macro 'FRAME_SIZE' ^ acr122s.c:74:47: note: expanded from macro 'APDU_SIZE'
This commit is contained in:
parent
5cda3af5d4
commit
a5d40cefc8
1 changed files with 7 additions and 2 deletions
|
@ -386,7 +386,9 @@ acr122s_get_firmware_version(nfc_device *pnd, char *version, size_t length)
|
||||||
int ret;
|
int ret;
|
||||||
uint8_t cmd[MAX_FRAME_SIZE];
|
uint8_t cmd[MAX_FRAME_SIZE];
|
||||||
|
|
||||||
acr122s_build_frame(pnd, cmd, sizeof(cmd), 0x48, 0, NULL, 0, 0);
|
if (! acr122s_build_frame(pnd, cmd, sizeof(cmd), 0x48, 0, NULL, 0, 0)) {
|
||||||
|
return NFC_EINVARG;
|
||||||
|
}
|
||||||
|
|
||||||
if ((ret = acr122s_send_frame(pnd, cmd, 1000)) != 0)
|
if ((ret = acr122s_send_frame(pnd, cmd, 1000)) != 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -639,7 +641,10 @@ acr122s_send(nfc_device *pnd, const uint8_t *buf, const size_t buf_len, int time
|
||||||
uart_flush_input(DRIVER_DATA(pnd)->port);
|
uart_flush_input(DRIVER_DATA(pnd)->port);
|
||||||
|
|
||||||
uint8_t cmd[MAX_FRAME_SIZE];
|
uint8_t cmd[MAX_FRAME_SIZE];
|
||||||
acr122s_build_frame(pnd, cmd, sizeof(cmd), 0, 0, buf, buf_len, 1);
|
if (! acr122s_build_frame(pnd, cmd, sizeof(cmd), 0, 0, buf, buf_len, 1)) {
|
||||||
|
return NFC_EINVARG;
|
||||||
|
}
|
||||||
|
|
||||||
int ret;
|
int ret;
|
||||||
if ((ret = acr122s_send_frame(pnd, cmd, timeout)) != 0) {
|
if ((ret = acr122s_send_frame(pnd, cmd, timeout)) != 0) {
|
||||||
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Unable to transmit data. (TX)");
|
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Unable to transmit data. (TX)");
|
||||||
|
|
Loading…
Add table
Reference in a new issue