Skip to content

Commit

Permalink
test: fix Windows compiler warnings in overlapped-checker
Browse files Browse the repository at this point in the history
Fixes two warnings:
- test\overlapped-checker\main_win.c(37,25): warning : format specifies
  type 'int' but the argument has type 'DWORD' (aka 'unsigned long')
  [-Wformat]
- test\overlapped-checker\main_win.c(9,14): warning : unused variable
  'write_count' [-Wunused-variable]

PR-URL: #52405
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
  • Loading branch information
targos authored and marco-ippolito committed May 3, 2024
1 parent f8ad300 commit 375c3db
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions test/overlapped-checker/main_win.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

static char buf[256];
static DWORD read_count;
static DWORD write_count;
static HANDLE stdin_h;
static OVERLAPPED stdin_o;

Expand Down Expand Up @@ -34,7 +33,7 @@ static void write(const char* buf, size_t buf_size) {
if (!WriteFile(stdout_h, buf, buf_size, &write_count, NULL)) {
die("overlapped write failed");
}
fprintf(stderr, "%d", write_count);
fprintf(stderr, "%ld", write_count);
fflush(stderr);
}

Expand Down

0 comments on commit 375c3db

Please sign in to comment.