ISO C90 forbids mixed declarations and code Warning [Kernel Module Makefile]
- by djTeller
Hi,
I'm trying to compile a linux kernel module using a Makefile which looks like so:
obj-m += main.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
and i'm getting the following warning:
main.c:54: warning: ISO C90 forbids mixed declarations and code
I need to switch to C99.
After reading i noticed i need to add a flag -std=c99, not sure where it suppose to be added.
How do I change the Makefile so it will compile through C99 ?
Thanks!