From mint-bounce@lists.fishpool.fi Sun Sep 5 15:31:26 2010 To: From: Peter Slegg Subject: Re: [MiNT] [Highwire] gcc4 Reply-To: Peter Slegg X-Mailer: MyMAIL Rev:1.94.13761 (Atari/(STiK/STinG/GlueSTiK)) X-Hardware: Atari Milan MIME-Version: 1.0 Date: Sun, 5 Sep 2010 20:28:58 +0200 (GMT) Content-Type: text/plain; charset="iso-8859-1" X-Priority: 3 X-MSMail-Priority: Normal Message-Id: <006732cb.01c29262200a@smtp.freeola.net> References: In-Reply-To: c32bc0c971aa1db91512952b99e881eb-EhVcX1lFRQVaRwYcDTpQCEFddQZLVF5dQUNBAjBTXF5bVkYPXkF3CVI6XF1XQkICVllbRg==-webmailer2@server06.w X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-to: mint-bounce@lists.fishpool.fi X-original-sender: p.slegg@scubadivers.co.uk Precedence: bulk List-help: List-unsubscribe: List-Id: X-List-ID: List-subscribe: List-owner: List-post: Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.sparemint.org id o85JVPOS027952 On Sun, 05 Sep 2010 19:55:26 , m0n0 wrote: > > Am Sonntag, den 05.09.2010, 14:41 +0200 schrieb Peter Slegg > : > > > static BOOL > > decGif_read (IMGINFO info, CHAR buffer) > > { > > GifPixelType *pixelType = buffer; <<<<<<<<< > > return (DGifGetLine (info->_priv_data, pixelType, info->ImgWidth) > > == GIF_OK); > > } > > > > The line indicated gives: > > > > img_gif.c: In function 'decGif_read': > > img_gif.c:115:28: error: initialization makes pointer from integer > > without a cast > > did you try: > > GifPixelType *pixelType = (GifPixelType *)buffer; > > ? > I have just "fixed" them by making more use of CHAR* in the function interface. I have just hit these which I am not familiar with: error: cast discards qualifiers from pointer target type something to do with volatiles. I have just tried compiling without -Wall as an experiment and it fails with a real error with the last, nasty line here: const GS_INFO *sender; short answ[8], *p_answ = answ; long *gsi_ = (long *)gsi; *p_answ++ /*[0]*/ = GS_REPLY; *p_answ++ /*[1]*/ = gl_apid; *p_answ++ /*[2]*/ = 0; *((long **)p_answ)++/*[3..4]*/ = gsi_; AEI.c: In function 'process_messages': AEI.c:1555:5: error: lvalue required as increment operand AEI.c:1559:5: error: lvalue required as increment operand It's trying to asign a value to something that has been ++ incremented so is itself a value. Not good. Should it be split into two lines and values assigned to p_answ 3 and 4 or just 4 ? Peter