assignment makes pointer from integer without a cast C

assignment makes pointer from integer without a cast C

I am using a structure

typedef struct ObjectHandle
{
    long *objHandle;
}ObjectHandle ;

A function where the output is the value of this structure

AllocateObject(ObjectHandle* objectHandle) 
{
   .... 
   ...
   ...
   objectHandle->objHandle = some long value;
}

But compiler is giving warning: assignment makes pointer from integer without a cast

Please help

Seems like you’re assigning the value not to the value (memory), but to a pointer (address)

Try this:
*(objectHandle->objHandle) = some long value;

.
.
.
.