[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]
Re: [XaraXtreme-dev] patch for warnings (3)
- From: Alex Bligh <alex@xxxxxxxxxxx>
- Date: Tue, 04 Jul 2006 09:43:54 +0100
- Subject: Re: [XaraXtreme-dev] patch for warnings (3)
Ben,
--On 04 July 2006 07:34 +0100 Ben Fowler <ben.the.mole@xxxxxxxxx> wrote:
The first two patches I'd take and will apply in a bit, but not this one
On Gentoo linux PPC (GCC4.1.1) I get several warnings where it seems
that there is mixed char and int arithmetic.
This patch shows the problem.
Ben
All these should do is cast EOF to "unsigned char" (or whatever "Ch" is).
Using hardcoded values is not nice. Alternatively, #define something
locally to be the casted version of EOF.
--- Kernel/ccfile.cpp (revision 1401)
+++ Kernel/ccfile.cpp (working copy)
@@ -2854,7 +2854,7 @@ CCFile& CCStreamFile::read(StringBase* b
if (RetValue == 0)
{
// found end of file so make sure we return an EOF as the data
- Ch = EOF;
+ Ch = 0xFF;
}
if (IOFile->fail())
Alex