Assignment makes pointer from integer without a cast
Bernard Dautrevaux
Dautrevaux@microprocess.com
Wed Mar 20 05:36:00 GMT 2002
> -----Original Message-----
> From: Lord Byron [mailto:lordbyronbr@yahoo.com]
> Sent: Wednesday, March 20, 2002 2:16 PM
> To: gcc@gcc.gnu.org
> Subject: Assignment makes pointer from integer without a cast
>
>
> I am using a function like this:
>
> (...)
>
> short int analyze(long int *id)
> {
> long int tid;
> tid = 2001;
> id = tid;
> }
>
> The gcc compiler gives a warning: "assignment makes
> pointer from integer without a cast", but if I do
> this:
> *id = tid;
> when it's running, it causes a Bus Error
Perhaps look at the code that calls analyze, and check what is passed as
parameter?
Bernard
--------------------------------------------
Bernard Dautrevaux
Microprocess Ingenierie
97 bis, rue de Colombes
92400 COURBEVOIE
FRANCE
Tel: +33 (0) 1 47 68 80 80
Fax: +33 (0) 1 47 88 97 85
e-mail: dautrevaux@microprocess.com
--------------------------------------------
More information about the Gcc
mailing list