• C

compiling error message

I wrote a C program , But when compilgin the C program, I got a warning message 'Nonportable pointer conversion'

what this warning message means ?
how to fix it although I still can run the program
adrianmakAsked:
Who is Participating?
 
rbrConnect With a Mentor Commented:
You cast from different pointers which will not be portable to other OSs. Can you post the line pls where this error occurs
0
 
wardkdCommented:
This sounds like you have assumed either the size of some object, the order that objects are stored in, or that you have used a questionable cast from one type to another.

In any case, the compiler is telling you that in a different operating system, these assumtions may not be valid.

The fact that your program works in your current environment doesn't mean that it will run in another, which is what the warning is telling you.

I can't tell you how to fix this code without seeing it, but maybe the information above might help.

Cheers.

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.