Skip to content

Commit

Permalink
Fix Windows warning
Browse files Browse the repository at this point in the history
../pcsc_scan.c: In function 'pcsc_stringify_error':
../pcsc_scan.c:67:63: warning: format '%X' expects argument of type 'unsigned int', but argument 4 has type 'DWORD' {aka 'long unsigned int'} [-Wformat=]
   67 |                 snprintf(buffer, sizeof(buffer), "ERROR: 0x%08X\n", rv);
      |                                                            ~~~^     ~~
      |                                                               |     |
      |                                                               |     DWORD {aka long unsigned int}
      |                                                               unsigned int
      |                                                            %08lX
  • Loading branch information
LudovicRousseau committed Aug 11, 2024
1 parent e63d138 commit 8d8add6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pcsc_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const char *pcsc_stringify_error(DWORD rv)
NULL))
{
/* if FormatMessage() failed */
snprintf(buffer, sizeof(buffer), "ERROR: 0x%08X\n", rv);
snprintf(buffer, sizeof(buffer), "ERROR: 0x%08lX\n", rv);
}

return buffer;
Expand Down

0 comments on commit 8d8add6

Please sign in to comment.