Handle all the all unused variables when generating code

What do you want to achieve?

when compiling code with gcc / mingw or clang,
there are tons of “\ui\ui_events.c:xxx: warning: unused parameter ‘e’ [-Wunused-parameter]”
you can add “(void)e;” in the function when generating code

p.s I don’t want to trun off the “-Wall -Wextra” flags of compiler!

and there are other warn when compiling code, please notice them and eliminate them…

Do you see alternative options and workaround to achieve it?

Mention some use cases

1 Like

You don’t have to turn off -Wall and -Wextra. If you use them but add -Wno-unused after them you can filter out only the unused variable/parameter/etc. issues. (Or -Wno-unused-parameter if you only want to turn off unused-parameter warnings.)
We’ll make improvements to the exported code and during the process, take your feedback into account.

1 Like