A warning suddenly becomes an error !?

Hi,

I'm working on a big project with a lott of sources files.
At compilation time I have a lot of #167-D warning
( warning: #167-D: argument of type "U8 *" is incompatible with parameter of type "const char *" for example ) .

Today I move some functions to another new source file to clean my code.
But when I compile , I get new errors in my new source file :
"error: #167: argument of type "U32 *" is incompatible with parameter of type "U8 *"

The warning in a source file becomes an error in another source file !!!

I didn't setup anything different for this source file , all compilation options are defined by the project.

What is the problem and how to solve it please ?

Parents
  • Previously it was a warning because although the items were of a different type they were the same size (8 bits).

    Now it is an error because you are trying to pass a pointer to a 32-bit value as a parameter to a function that is expecting a pointer to an 8-bit value.

    To fix the problem make sure that the size of the data that you are passing as parameters to the function matches the size of the data expected by the function.

Reply
  • Previously it was a warning because although the items were of a different type they were the same size (8 bits).

    Now it is an error because you are trying to pass a pointer to a 32-bit value as a parameter to a function that is expecting a pointer to an 8-bit value.

    To fix the problem make sure that the size of the data that you are passing as parameters to the function matches the size of the data expected by the function.

Children
More questions in this forum