Skip to content

Commit eb62701

Browse files
committed
tcbench.cpp: Fix Visual C++ compiler warnings
1 parent 292ff50 commit eb62701

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

diags/tcbench.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright (C)2004 Landmark Graphics Corporation
22
// Copyright (C)2006-2007 Sun Microsystems, Inc.
3-
// Copyright (C)2011, 2013-2014, 2016-2019 D. R. Commander
3+
// Copyright (C)2011, 2013-2014, 2016-2019, 2021 D. R. Commander
44
//
55
// This library is free software and may be redistributed and/or modified under
66
// the terms of the wxWindows Library License, Version 3.1 or (at your option)
@@ -191,7 +191,9 @@ int main(int argc, char **argv)
191191
else if(!stricmp(argv[i], "-wh") && i < argc - 1)
192192
{
193193
#ifdef _WIN32
194-
if(sscanf(argv[++i], "%x", &wh) < 1 || wh <= 0) usage();
194+
size_t temp = 0;
195+
if(sscanf(argv[++i], "%zx", &temp) < 1 || temp <= 0) usage();
196+
wh = (fbx_wh)temp;
195197
#else
196198
unsigned int temp = 0;
197199
if(sscanf(argv[++i], "%x", &temp) < 1 || temp <= 0) usage();
@@ -260,7 +262,7 @@ int main(int argc, char **argv)
260262
}
261263
char temps[1024];
262264
GetWindowText(wh, temps, 1024);
263-
printf("Monitoring window 0x%.8x (%s)\n", wh, temps);
265+
printf("Monitoring window 0x%.8zx (%s)\n", (size_t)wh, temps);
264266

265267
#else
266268

0 commit comments

Comments
 (0)