Re: Psiconv compilation


Subject: Re: Psiconv compilation
From: Sam TH (sam@uchicago.edu)
Date: Sat Jan 20 2001 - 04:26:41 CST


On Sat, Jan 20, 2001 at 11:23:02AM +0100, Hubert Figuiere wrote:
> Hello,
>
> I'm trying to compile the psiconv library on MacOS. I get this error:
>
> Error : illegal implicit conversion from 'unsigned long *' to
> 'int *'
> parse_image.c line 267 linelen,&linepos,picsize)) {
>
> Lines 266-267 are
> if
> (decode_byte(lev+3,off+len+datanr,*result,&pixelnr,temp,bits_per_pixel,
> linelen,&linepos,picsize)) {
>
> decodebyte take a int * as a last parameter while picsize is declared
> as psiconv_u32.
>
> Basically, this is a type problem, and since there is no guarantee
> that 'int' be a 32-bits value (it is in the present case, ie PowerPC
> code, but in 68k it may not be), I think that this should be avoided.
> What shall I do (instead of a mad wild typecase) ?

Is there a reason not to just make decode_byte take a psiconv_u32?
 
                                sam th
                                sam@uchicago.edu
                                http://www.abisource.com/~sam
                                GnuPG Key:
                                http://www.abisource.com/~sam/key




This archive was generated by hypermail 2b25 : Sat Jan 20 2001 - 04:26:42 CST