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: And then, in my .c code, I have this: 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 This will close the compiler. Typing File Type MyStruct {int thing; Zero * reserved; } Mystread; Zero Fu (Mystrak * bar);
typedef straight extension {float more_stuff; } extended guideline; Struct MyStructEx {int cheese; EXTENDED * ex; } MyStructEx; Void foo (MyStructEx * bar) {...}
typedef structure Expanded {float more_stuff; } extended guideline; Struct MyStructEx {int cheese; EXTENDED * ex; } MyStructEx; Zero Fu (Mystrakt * Bar) {Mystructurex * MSE = (Mystructurex *) bar; ...}
Comments
Post a Comment