I wrote a C extension file program where my function is declared with C langage with parameters and writen in ASM langage: int MyFunc(int param1, int param2) { #asm ... ... #endasm } From other files, the call is working but I have WARNING in compilation of my assembly file on param1 and param2 because I don't use them directly but I use register R4 to R7. The program is working but I don't understand how can I write the program to don't have any warning.
in fact with dummy assigments at the beginning of the function warnings disappear int MyFunc(int param1, int param2) { param1 = param1; param2 = param2; #asm ... ... #endasm } it's still warning on non-return value...
Yes, I've seen that trick before, but some compilers actually generate code for the useless statements! With some others, this just gives you a different warning, "code with no effect" or something!