c - Implicit parameter cast -


I have a code that works in the following manner: There is an announcement for the function in the header, say: Typing File Type MyStruct {int thing; Zero * reserved; } Mystread; Zero Fu (Mystrak * bar);

And then, in my .c code, I have this:

  typedef straight extension {float more_stuff; } extended guideline; Struct MyStructEx {int cheese; EXTENDED * ex; } MyStructEx; Void foo (MyStructEx * bar) {...}   

This is fine under MSVC (with the warning that the header and implementation parameters do not match), but the code :: block ( GCC throws an error on this? Is there a way to silence this error or at least make it a warning, or am I the only option to put extra definitions in the header?

I am doing this because I have a modular library in C, so sometimes the individual components need "scratch space" to work (which is reserved * in the header), and every To avoid the place bunch I place the general purpose for mystate structure for a more specific one.

So my question is, which option is I using to change this kind of error in a warning, and / or is there a better way of achieving this goal? (I need to use standard C).

Keep the prototype function and insert the pointer in the function Definition

  typedef structure Expanded {float more_stuff; } extended guideline; Struct MyStructEx {int cheese; EXTENDED * ex; } MyStructEx; Zero Fu (Mystrakt * Bar) {Mystructurex * MSE = (Mystructurex *) bar; ...}   

This will close the compiler.

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -