From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f5392,53889543ba1b8d53 X-Google-Attributes: gidf5392,public X-Google-Thread: 1014db,53889543ba1b8d53 X-Google-Attributes: gid1014db,public X-Google-Thread: 111c93,53889543ba1b8d53 X-Google-Attributes: gid111c93,public From: arnoud Subject: Re: warning: cast from pointer Date: 2000/12/07 Message-ID: <3A2F5F6A.832F8AB9@firstlinux.net>#1/1 X-Deja-AN: 702106222 Content-Transfer-Encoding: 7bit References: <90l6v9$v8l$1@nnrp1.deja.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: ericsson Mime-Version: 1.0 Newsgroups: comp.lang.c,comp.os.linux.development.system,comp.os.linux.alpha For those cases that the warning is "just a warning" you should (MUST) do the cast your self e.g. if you have: char cPrevCounter; int iPnt; cPrevCounter = (char)iPnt; instead of cPrevCounter = iPnt; In this way you (or other reviewing your code) knows that you DID think over that there is the possiblity of cast problem. If the warning isn't jus a warning you should fix the code for this!!! Regards, Arnoud. "Dr. Unk" wrote: > I would like know how to clean up a source, so that I do not get any > more "warning: cast from pointer to integer of different size" or > "incompatible pointer" warnings. I know that in most cases they are > just that, warnings. But sometimes, I believe them to be the cause if > many seg faults and floating point exceptions. > > My C knowledge is basic-level (2 courses taken). My system is an > AlphaPC 164SX, Glibc-2.1.3, GCC-2.95.2, Linux-2.2.17. > > Thanks in advance. > > Sent via Deja.com http://www.deja.com/ > Before you buy.