This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Pointer conversion / arithmetic

Hello,
I am trying to create an address (memory model huge) by adding
an offset to a base address:

void test (unsigned short offset)
{ unsigned char *adr;

adr = 0x120000 + (long) adr;
}

Doing this, I get the warning 40: "'long' converted to 'huge' pointer".
I can disable the warning with "#pragma warning disable = 40", so that
the compiler doesn't complain, but what is the correct way to do this
without producing a warning?
Thanks for any help!
Holger