mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-02-19 08:16:35 +00:00
fixd compiler warnings
This commit is contained in:
@@ -176,7 +176,7 @@ uart_receive(serial_port sp, uint8_t *pbtRx, const size_t szRx, void *abort_p, i
|
||||
timeouts.WriteTotalTimeoutConstant = timeout_ms;
|
||||
|
||||
if (!SetCommTimeouts(((struct serial_port_windows *) sp)->hPort, &timeouts)) {
|
||||
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "Unable to apply new timeout settings.");
|
||||
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Unable to apply new timeout settings.");
|
||||
return NFC_EIO;
|
||||
}
|
||||
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "Timeouts are set to %lu ms", timeout_ms);
|
||||
@@ -185,7 +185,7 @@ uart_receive(serial_port sp, uint8_t *pbtRx, const size_t szRx, void *abort_p, i
|
||||
// - According to MSDN, it could be better to implement nfc_abort_command() mecanism using Cancello()
|
||||
volatile bool *abort_flag_p = (volatile bool *)abort_p;
|
||||
do {
|
||||
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "ReadFile");
|
||||
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%s", "ReadFile");
|
||||
res = ReadFile(((struct serial_port_windows *) sp)->hPort, pbtRx + dwTotalBytesReceived,
|
||||
dwBytesToGet,
|
||||
&dwBytesReceived, NULL);
|
||||
@@ -226,7 +226,7 @@ uart_send(serial_port sp, const uint8_t *pbtTx, const size_t szTx, int timeout)
|
||||
timeouts.WriteTotalTimeoutConstant = timeout;
|
||||
|
||||
if (!SetCommTimeouts(((struct serial_port_windows *) sp)->hPort, &timeouts)) {
|
||||
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "Unable to apply new timeout settings.");
|
||||
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Unable to apply new timeout settings.");
|
||||
return NFC_EIO;
|
||||
}
|
||||
|
||||
|
||||
@@ -198,11 +198,12 @@ acr122s_send_frame(nfc_device *pnd, uint8_t *frame, int timeout)
|
||||
uint8_t positive_ack[4] = { STX, 0, 0, ETX };
|
||||
serial_port port = DRIVER_DATA(pnd)->port;
|
||||
int ret;
|
||||
void *abort_p;
|
||||
|
||||
#ifndef WIN32
|
||||
void *abort_p;
|
||||
abort_p = &(DRIVER_DATA(pnd)->abort_fds[1]);
|
||||
#else
|
||||
volatile void *abort_p;
|
||||
abort_p = &(DRIVER_DATA(pnd)->abort_flag);
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user