I get the following error with the following code. I tried to figure out where the problem is over Google, but I didn't find anything helpful.
Compiling /home/tectu/projects/resources/chibios/ext/lcd/touchpad.c
In file included from /home/tectu/projects/resources/chibios/ext/lcd/touchpad.c:1:0:
/home/tectu/projects/resources/chibios/ext/lcd/touchpad.h:17:1: warning: useless type qualifier in empty declaration [enabled by default]
Here's the the code from line 12 to line 17 from touchpad.h
:
volatile struct cal {
float xm;
float ym;
float xn;
float yn;
};
And here's how I use this struct inside touchpad.c
:
static struct cal cal = {
1, 1, 0, 0
};
Can anyone show me the light? :D
volatile
as a qualifier can be applied to a particular instance of structure.
You are applying it to a type which is useless and the compiler correctly points it out.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With