From: cuz Date: Tue, 18 Jul 2000 22:39:35 +0000 (+0000) Subject: Fixed some gcc warnings X-Git-Tag: V2.12.0~3345 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5337ff7bcd8bca9a30dd46d4287bb81f0525d8c2;p=cc65 Fixed some gcc warnings git-svn-id: svn://svn.cc65.org/cc65/trunk@169 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/cc65/codegen.c b/src/cc65/codegen.c index dfc986d09..db5cd9cbb 100644 --- a/src/cc65/codegen.c +++ b/src/cc65/codegen.c @@ -2491,7 +2491,7 @@ void g_add (unsigned flags, unsigned long val) }; if (flags & CF_CONST) { - flags &= ~CF_FORCECHAR; // Handle chars as ints + flags &= ~CF_FORCECHAR; /* Handle chars as ints */ g_push (flags & ~CF_CONST, 0); } oper (flags, val, ops); @@ -2510,7 +2510,7 @@ void g_sub (unsigned flags, unsigned long val) }; if (flags & CF_CONST) { - flags &= ~CF_FORCECHAR; // Handle chars as ints + flags &= ~CF_FORCECHAR; /* Handle chars as ints */ g_push (flags & ~CF_CONST, 0); } oper (flags, val, ops); @@ -2552,7 +2552,7 @@ void g_mul (unsigned flags, unsigned long val) } /* If the right hand side is const, the lhs is not on stack but still - * in the primary register. + * in the primary register. */ if (flags & CF_CONST) { @@ -2603,7 +2603,7 @@ void g_mul (unsigned flags, unsigned long val) /* If we go here, we didn't emit code. Push the lhs on stack and fall * into the normal, non-optimized stuff. */ - flags &= ~CF_FORCECHAR; // Handle chars as ints + flags &= ~CF_FORCECHAR; /* Handle chars as ints */ g_push (flags & ~CF_CONST, 0); } @@ -2633,7 +2633,7 @@ void g_div (unsigned flags, unsigned long val) /* Generate a division */ if (flags & CF_CONST) { /* lhs is not on stack */ - flags &= ~CF_FORCECHAR; // Handle chars as ints + flags &= ~CF_FORCECHAR; /* Handle chars as ints */ g_push (flags & ~CF_CONST, 0); } oper (flags, val, ops); @@ -2661,7 +2661,7 @@ void g_mod (unsigned flags, unsigned long val) /* Do it the hard way... */ if (flags & CF_CONST) { /* lhs is not on stack */ - flags &= ~CF_FORCECHAR; // Handle chars as ints + flags &= ~CF_FORCECHAR; /* Handle chars as ints */ g_push (flags & ~CF_CONST, 0); } oper (flags, val, ops); diff --git a/src/cc65/litpool.c b/src/cc65/litpool.c index 65c896d58..6243e38b5 100644 --- a/src/cc65/litpool.c +++ b/src/cc65/litpool.c @@ -167,7 +167,7 @@ const char* GetLiteral (unsigned Offs) /* Get a pointer to the literal with the given offset in the pool */ { CHECK (Offs < LiteralOffs); - return &LiteralPool[Offs]; + return (const char*) &LiteralPool[Offs]; } diff --git a/src/cc65/preproc.c b/src/cc65/preproc.c index 115d57beb..321b3b175 100644 --- a/src/cc65/preproc.c +++ b/src/cc65/preproc.c @@ -753,7 +753,7 @@ enum { PP_LINE, PP_PRAGMA, PP_UNDEF, - PP_ILLEGAL, + PP_ILLEGAL }; static const struct tok_elt pre_toks[] = {