Re: pgcryto failures on freebsd/alpha - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: pgcryto failures on freebsd/alpha
Date
Msg-id 200201030613.g036Dtv15980@candle.pha.pa.us
Whole thread Raw
In response to Re: pgcryto failures on freebsd/alpha  (Marko Kreen <marko@l-t.ee>)
Responses Re: pgcryto failures on freebsd/alpha  (Marko Kreen <marko@l-t.ee>)
List pgsql-hackers
Marko Kreen wrote:
> On Fri, Dec 21, 2001 at 11:43:21AM +0800, Christopher Kings-Lynne wrote:
> > Hi Marko,
> > 
> > Just testing pgcrypto on freebsd/alpha.  I get some warnings:
> > 
> > gcc -pipe -O -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -DPIC  
> > -DRAND_SILLY -I.  -I. -I../../src/include   -c -
> > o internal.o internal.c
> > internal.c: In function `rj_encrypt':
> > internal.c:314: warning: cast from pointer to integer of different size
> > internal.c: In function `rj_decrypt':
> > internal.c:342: warning: cast from pointer to integer of different size
> > internal.c: In function `bf_encrypt':
> > internal.c:429: warning: cast from pointer to integer of different size
> > internal.c: In function `bf_decrypt':
> > internal.c:453: warning: cast from pointer to integer of different size
> 
> They should be harmless, although I should fix them.

The actual code is:
   if ((dlen & 15) || (((unsigned) res) & 3))       return -1;

while res is defined as an uint8 pointer:
   rj_encrypt(PX_Cipher * c, const uint8 *data, unsigned dlen, uint8 *res)

Hard to imagine how (uint *) & 3 makes any sense, unless res isn't
always a (uint8 *).  Is that true?

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Possible bug in vacuum redo
Next
From: Bruce Momjian
Date:
Subject: Re: Status on RC1?