From: cuz Date: Thu, 8 Jun 2000 20:55:04 +0000 (+0000) Subject: Fix several VC++ Warnings X-Git-Tag: V2.12.0~3474 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=386c3d412d265b0e86c938eb137b4ae7e907f132;p=cc65 Fix several VC++ Warnings git-svn-id: svn://svn.cc65.org/cc65/trunk@38 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/ld65/fileio.c b/src/ld65/fileio.c index 263f3ab48..3876c12ea 100644 --- a/src/ld65/fileio.c +++ b/src/ld65/fileio.c @@ -47,7 +47,7 @@ -void Write8 (FILE* F, unsigned char Val) +void Write8 (FILE* F, unsigned Val) /* Write an 8 bit value to the file */ { if (putc (Val, F) == EOF) { diff --git a/src/ld65/fileio.h b/src/ld65/fileio.h index 390d35ed3..44b3e789f 100644 --- a/src/ld65/fileio.h +++ b/src/ld65/fileio.h @@ -50,7 +50,7 @@ -void Write8 (FILE* F, unsigned char Val); +void Write8 (FILE* F, unsigned Val); /* Write an 8 bit value to the file */ void Write16 (FILE* F, unsigned Val); diff --git a/src/ld65/o65.c b/src/ld65/o65.c index ae67ca0af..18a582e33 100644 --- a/src/ld65/o65.c +++ b/src/ld65/o65.c @@ -303,7 +303,7 @@ static void FreeO65RelocTab (O65RelocTab* R) -static void O65RelocPutByte (O65RelocTab* R, unsigned char B) +static void O65RelocPutByte (O65RelocTab* R, unsigned B) /* Put the byte into the relocation table */ { /* Do we have enough space in the buffer? */ @@ -316,7 +316,7 @@ static void O65RelocPutByte (O65RelocTab* R, unsigned char B) } /* Put the byte into the buffer */ - R->Buf [R->Fill++] = B; + R->Buf [R->Fill++] = (unsigned char) B; } @@ -454,7 +454,7 @@ static unsigned O65WriteExpr (ExprNode* E, int Signed, unsigned Size, O65RelocPutByte (D->CurReloc, 0xFF); Diff -= 0xFE; } - O65RelocPutByte (D->CurReloc, Diff); + O65RelocPutByte (D->CurReloc, (unsigned char) Diff); /* Remember this offset for the next time */ D->LastOffs = Offs; diff --git a/src/ld65/segments.c b/src/ld65/segments.c index 94a3149e0..57b288f09 100644 --- a/src/ld65/segments.c +++ b/src/ld65/segments.c @@ -168,7 +168,7 @@ static Section* NewSection (Segment* Seg, unsigned char Align, unsigned char Typ /* Calculate the alignment bytes needed for the section */ V = (0x01UL << S->Align) - 1; - S->Fill = ((Seg->Size + V) & ~V) - Seg->Size; + S->Fill = (unsigned char) (((Seg->Size + V) & ~V) - Seg->Size); /* Adjust the segment size and set the section offset */ Seg->Size += S->Fill;