> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 15, 2007 3:35 PM
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] runtime errors in DEBUG with byte overflow in
RC4-
> based random (3.3.15)
> 
> "Andrew Finkenstadt" <[EMAIL PROTECTED]> wrote:
> >
> > Any objections to taking back patches that bit-wise and the result
of
> the
> > overflowing addition with 0xff ?
> >
> 
> The variables being added are unsigned chars and the result
> is stored in an unsigned char.  Am I to understand that you have
> a compiler that does not limit the range of an unsigned char
> to 0x00 through 0xff?

Even if it does, the sum is promoted as needed, and so is generally an
int in the range 0x00 to 0x1fe.  Masking off the bits is, in practice,
an effective way of shutting up compiler warnings about truncation.

-- James


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to