mesman00
13th August 2009, 19:19
I am getting a weird compile error:
I am trying to compile the following code:
unsigned short *test;
unsigned addr;
test = (unsigned short*) calloc(1, sizeof(short));
addr = (unsigned) test;
note that the above is just an example to illustrate my problem. This compiles fine in visual studio. however, using qmake and make, I am getting the following error:
error: cast from "short unsigned int*" to "unsigned int" loses precision
does anyone know what might be causing this? i have never encountered this before.
I am trying to compile the following code:
unsigned short *test;
unsigned addr;
test = (unsigned short*) calloc(1, sizeof(short));
addr = (unsigned) test;
note that the above is just an example to illustrate my problem. This compiles fine in visual studio. however, using qmake and make, I am getting the following error:
error: cast from "short unsigned int*" to "unsigned int" loses precision
does anyone know what might be causing this? i have never encountered this before.