use z modifier for printing size_t
This commit is contained in:
@@ -145,7 +145,7 @@ static int list_readers(sc_context_t *ctx)
|
|||||||
} else {
|
} else {
|
||||||
strncpy(card_atr, "[no card present]", sizeof card_atr);
|
strncpy(card_atr, "[no card present]", sizeof card_atr);
|
||||||
}
|
}
|
||||||
printf("%-4d %-7s %s\n", i, reader->driver->short_name, reader->name);
|
printf("%-4zu %-7s %s\n", i, reader->driver->short_name, reader->name);
|
||||||
printf(" ATR: %s\n", card_atr);
|
printf(" ATR: %s\n", card_atr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ IFDHCreateChannelByName (DWORD Lun, LPSTR DeviceName)
|
|||||||
if (hostname_len < sizeof _hostname)
|
if (hostname_len < sizeof _hostname)
|
||||||
memcpy(_hostname, DeviceName, hostname_len);
|
memcpy(_hostname, DeviceName, hostname_len);
|
||||||
else {
|
else {
|
||||||
Log3(PCSC_LOG_ERROR, "Not enough memory to hold hostname (have %u, need %u)", sizeof _hostname, hostname_len);
|
Log3(PCSC_LOG_ERROR, "Not enough memory to hold hostname (have %zu, need %zu)", sizeof _hostname, hostname_len);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
_hostname[hostname_len] = '\0';
|
_hostname[hostname_len] = '\0';
|
||||||
@@ -233,7 +233,7 @@ IFDHGetCapabilities (DWORD Lun, DWORD Tag, PDWORD Length, PUCHAR Value)
|
|||||||
Log1(PCSC_LOG_ERROR, "Virtual ICC removed");
|
Log1(PCSC_LOG_ERROR, "Virtual ICC removed");
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
Log2(PCSC_LOG_DEBUG, "Got ATR (%d bytes)", size);
|
Log2(PCSC_LOG_DEBUG, "Got ATR (%zd bytes)", size);
|
||||||
|
|
||||||
#ifndef __APPLE__
|
#ifndef __APPLE__
|
||||||
if (*Length < size) {
|
if (*Length < size) {
|
||||||
|
|||||||
Reference in New Issue
Block a user