Commit bb153076 authored by Ludovic Rousseau's avatar Ludovic Rousseau

Fix compiler warnings on macOS

pcsc_scan.c:488:9: warning: comparison of integers of different signs: 'LONG'
      (aka 'int') and 'unsigned int' [-Wsign-compare]
        if (rv != SCARD_E_NO_READERS_AVAILABLE)
            ~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pcsc_scan.c:520:35: warning: comparison of integers of different signs:
      'unsigned int' and 'LONG' (aka 'int') [-Wsign-compare]
        if (SCARD_E_NO_READERS_AVAILABLE == rv || 0 == nbReaders)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~
pcsc_scan.c:539:28: warning: comparison of integers of different signs:
      'unsigned int' and 'LONG' (aka 'int') [-Wsign-compare]
                        while ((SCARD_E_TIMEOUT == rv) && !spinning_inte...
                                ~~~~~~~~~~~~~~~ ^  ~~
pcsc_scan.c:551:38: warning: comparison of integers of different signs:
      'unsigned int' and 'LONG' (aka 'int') [-Wsign-compare]
                                if (SCARD_E_NO_READERS_AVAILABLE == rv)
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~
pcsc_scan.c:623:41: warning: comparison of integers of different signs: 'LONG'
      (aka 'int') and 'unsigned int' [-Wsign-compare]
        while (((rv == SCARD_S_SUCCESS) || (rv == SCARD_E_TIMEOUT)) && !spinning...
                                            ~~ ^  ~~~~~~~~~~~~~~~
pcsc_scan.c:653:10: warning: comparison of integers of different signs: 'LONG'
      (aka 'int') and 'unsigned int' [-Wsign-compare]
                if (rv != SCARD_E_TIMEOUT)
                    ~~ ^  ~~~~~~~~~~~~~~~
pcsc_scan.c:798:29: warning: comparison of integers of different signs:
      'unsigned int' and 'LONG' (aka 'int') [-Wsign-compare]
        if (SCARD_E_UNKNOWN_READER == rv)
            ~~~~~~~~~~~~~~~~~~~~~~ ^  ~~
parent 206b2a2f
......@@ -411,7 +411,11 @@ static void print_version(void)
int main(int argc, char *argv[])
{
int current_reader;
#ifdef __APPLE__
uint32_t rv;
#else
LONG rv;
#endif
SCARDCONTEXT hContext;
SCARD_READERSTATE *rgReaderStates_t = NULL;
SCARD_READERSTATE rgReaderStates[1];
......
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