Commit 72b10c5d authored by Philippe Teuwen's avatar Philippe Teuwen

Fix warnings: ignoring return value of 'pipe' & discarding const qualifier

parent 24e1edd8
......@@ -477,7 +477,9 @@ acr122s_scan(const nfc_context *context, nfc_connstring connstrings[], const siz
DRIVER_DATA(pnd)->seq = 0;
#ifndef WIN32
pipe(DRIVER_DATA(pnd)->abort_fds);
if (pipe(DRIVER_DATA(pnd)->abort_fds) < 0) {
return 0;
}
#else
DRIVER_DATA(pnd)->abort_flag = false;
#endif
......
......@@ -124,7 +124,9 @@ arygon_scan(const nfc_context *context, nfc_connstring connstrings[], const size
#ifndef WIN32
// pipe-based abort mecanism
pipe(DRIVER_DATA(pnd)->iAbortFds);
if (pipe(DRIVER_DATA(pnd)->iAbortFds) < 0) {
return 0;
}
#else
DRIVER_DATA(pnd)->abort_flag = false;
#endif
......
......@@ -101,7 +101,9 @@ pn532_uart_scan(const nfc_context *context, nfc_connstring connstrings[], const
#ifndef WIN32
// pipe-based abort mecanism
pipe(DRIVER_DATA(pnd)->iAbortFds);
if (pipe(DRIVER_DATA(pnd)->iAbortFds) < 0) {
return 0;
}
#else
DRIVER_DATA(pnd)->abort_flag = false;
#endif
......@@ -252,7 +254,9 @@ pn532_uart_open(const nfc_context *context, const nfc_connstring connstring)
#ifndef WIN32
// pipe-based abort mecanism
pipe(DRIVER_DATA(pnd)->iAbortFds);
if (pipe(DRIVER_DATA(pnd)->iAbortFds) < 0) {
return NULL;
}
#else
DRIVER_DATA(pnd)->abort_flag = false;
#endif
......@@ -484,7 +488,9 @@ pn532_uart_abort_command(nfc_device *pnd)
if (pnd) {
#ifndef WIN32
close(DRIVER_DATA(pnd)->iAbortFds[0]);
pipe(DRIVER_DATA(pnd)->iAbortFds);
if (pipe(DRIVER_DATA(pnd)->iAbortFds) < 0) {
return NFC_ESOFT;
}
#else
DRIVER_DATA(pnd)->abort_flag = true;
#endif
......
......@@ -186,7 +186,7 @@ void
nfc_exit(nfc_context *context)
{
while (nfc_drivers) {
struct nfc_driver_list *pndl = nfc_drivers;
struct nfc_driver_list *pndl = (struct nfc_driver_list *) nfc_drivers;
nfc_drivers = pndl->next;
free(pndl);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment