fix Windows 64-bit compile for check-structures-sanity

fix some sprintf size_t-related warnings
develop
Ben Lubar 2020-02-05 20:29:16 -06:00
parent 860131cf96
commit d494eb619d
No known key found for this signature in database
GPG Key ID: 92939677AB59EDA4
2 changed files with 10 additions and 2 deletions

@ -4,6 +4,14 @@
#include "DataDefs.h"
#include "DataIdentity.h"
#if defined(WIN32) && defined(DFHACK64)
#define _WIN32_WINNT 0x0501
#define WINVER 0x0501
#define WIN32_LEAN_AND_MEAN
#include <winnt.h>
#endif
#include <set>
#include <typeinfo>
@ -108,7 +116,7 @@ Checker::Scope::Scope(Checker *parent, const std::string & name) :
}
Checker::Scope::Scope(Checker *parent, size_t index) :
Scope(parent, stl_sprintf("[%lu]", index))
Scope(parent, stl_sprintf("[%zu]", index))
{
}

@ -76,7 +76,7 @@ void outputHex(uint8_t *buf,uint8_t *lbuf,size_t len,size_t start,color_ostream
for(size_t i=0;i<len;i+=page_size)
{
//con.gotoxy(1,i/page_size+1);
con.print("0x%08lX ",i+start);
con.print("0x%08zX ",i+start);
for(size_t j=0;(j<page_size) && (i+j<len);j++)
{
if(j%sizeof(void*)==0)