This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

What do I have to do?!

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]