From: Oliver Schmidt Date: Tue, 9 Apr 2013 21:10:57 +0000 (+0200) Subject: Allow for warning-free build of ld65 with MS VC on warning level 3. X-Git-Tag: V2.14~66 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d38b008080e54fb4e48ea99825cda749029d560a;p=cc65 Allow for warning-free build of ld65 with MS VC on warning level 3. --- diff --git a/src/ld65/dbgsyms.c b/src/ld65/dbgsyms.c index 551979aac..090e0cdf8 100644 --- a/src/ld65/dbgsyms.c +++ b/src/ld65/dbgsyms.c @@ -369,7 +369,7 @@ void PrintDbgSyms (FILE* F) "sym\tid=%u,name=\"%s\",addrsize=%s", O->SymBaseId + J, GetString (S->Name), - AddrSizeToStr (S->AddrSize)); + AddrSizeToStr ((unsigned char) S->AddrSize)); /* Emit the size only if we know it */ if (S->Size != 0) { diff --git a/src/ld65/exports.c b/src/ld65/exports.c index df51bf8f5..90c7bc7b3 100644 --- a/src/ld65/exports.c +++ b/src/ld65/exports.c @@ -674,8 +674,8 @@ static void CheckSymType (const Export* E) /* Export and import address sizes do not match */ StrBuf ExportLoc = STATIC_STRBUF_INITIALIZER; StrBuf ImportLoc = STATIC_STRBUF_INITIALIZER; - const char* ExpAddrSize = AddrSizeToStr (E->AddrSize); - const char* ImpAddrSize = AddrSizeToStr (I->AddrSize); + const char* ExpAddrSize = AddrSizeToStr ((unsigned char) E->AddrSize); + const char* ImpAddrSize = AddrSizeToStr ((unsigned char) I->AddrSize); const LineInfo* ExportLI = GetExportPos (E); const LineInfo* ImportLI = GetImportPos (I); @@ -884,7 +884,7 @@ void PrintExportMap (FILE* F) GetExportVal (E), E->ImpCount? 'R' : ' ', SYM_IS_LABEL (E->Type)? 'L' : 'E', - GetAddrSizeCode (E->AddrSize), + GetAddrSizeCode ((unsigned char) E->AddrSize), SYM_IS_CONDES (E->Type)? 'I' : ' '); if (++Count == 2) { Count = 0;