Path: chuka.playstation.co.uk!news From: "Derek da Silva" Newsgroups: scee.yaroze.freetalk.english Subject: Re: George Bain Tutorial Warnings Date: Sat, 13 Jul 2002 09:24:58 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 40 Message-ID: References: NNTP-Posting-Host: pc-62-30-77-144-az.blueyonder.co.uk X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Hi Rikki Just typecast the pointers to the cntrl_data struct: GetPadBuf((volatile u_char**)&buffer1,(volatile u_char**)&buffer2) That should get rid of the warnings for you.. Derek "Rikki Prince" wrote in message news:ago2i2$d9k14@www.netyaroze-europe.com... > I hope people don't mind me posting this here - it just seems all > other groups are pretty much dead, so asking here is the only way to > get a response :-) > > Anyway, onto the question. In George Bain's tutorials, when they are > compiled, they all (well, I'm assuming all, as they all should use the > same code for controllers) spit out the following: > > warning: passing arg 1 of `GetPadBuf' from incompatible pointer type > warning: passing arg 2 of `GetPadBuf' from incompatible pointer type > > Now I'm pretty sure this is because George's code is passing a pointer > (to a pointer, in fact) to his own data structure (cntrl_data) to > GetPadBuf, while GetPadBuf is expecting a pointer to a pointer to a > char. Is there anyway to avoid this warning, as I'm trying to do a > similar thing to make some 'library files' (basically just the output > files with .lib instead of .o) but when I come to compile other things > and include these .lib files as input files, it says the function > which calls GetPadBuf is unreferenced (etc etc blah de blah). > > Can anyone suggest anything? > > Cheers, > Rikki > >