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

Casting without warning

Hi,

I really like to compile all my code with the highest warning level and having the beautifull result of 0, errors and 0 warnings!

The problem is that I need to access to functions as pointers and the casting is giving me one warning that I can not remove!

I have the following code:

"
[1] int (*update_params)(void far *,unsigned);

[2] int (*restore_params)(void far *,unsigned);

[3] update_params = 0x0600;
[4] restore_params = 0x0800;
"

The C166 compiler gives two warnings on the lines 3 and 4: Warning C12: '=': 'int' converted to pointer.

The code is ok but I do not know how to remove the warnings with the proper cast.

Thanks in advance

Joao Martins

0