Getting following compiler warnings. Should I clean this up?
/home/lhan/Projects/kgdboe/kgdboe_main.c:71:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
71 | int err = kgdboe_io_init(device_name, udp_port, local_ip, force_single_core != 0);
| ^~~
CC [M] /home/lhan/Projects/kgdboe/kgdboe_io.o
/home/lhan/Projects/kgdboe/kgdboe_io.c: In function ‘kgdboe_read_char’:
/home/lhan/Projects/kgdboe/kgdboe_io.c:88:5: warning: this ‘while’ clause does not guard... [-Wmisleading-indentation]
88 | while (s_IncomingRingBufferReadPosition == s_IncomingRingBufferWritePosition)
| ^~~~~
/home/lhan/Projects/kgdboe/kgdboe_io.c:91:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘while’
91 | result = s_IncomingRingBuffer[s_IncomingRingBufferReadPosition++];
| ^~~~~~
/home/lhan/Projects/kgdboe/kgdboe_io.c: In function ‘force_single_cpu_mode’:
/home/lhan/Projects/kgdboe/kgdboe_io.c:128:9: warning: unused variable ‘cpu’ [-Wunused-variable]
128 | int cpu;
| ^~~
In file included from /home/lhan/Projects/kgdboe/kgdboe_io.c:8:
/home/lhan/Projects/kgdboe/kgdboe_io.c: In function ‘kgdboe_io_init’:
/home/lhan/Projects/kgdboe/tracewrapper.h:8:30: warning: initialization of ‘int *’ from ‘long unsigned int’ makes pointer from integer without a cast [-Wint-conversion]
8 | #define kallsyms_lookup_name ((unsigned long(*)(const char *))kallsyms_lookup_name_address)
| ^
/home/lhan/Projects/kgdboe/kgdboe_io.c:175:30: note: in expansion of macro ‘kallsyms_lookup_name’
175 | int *_gro_normal_batch = kallsyms_lookup_name("gro_normal_batch");
| ^~~~~~~~~~~~~~~~~~~~
/home/lhan/Projects/kgdboe/kgdboe_io.c:175:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
175 | int *_gro_normal_batch = kallsyms_lookup_name("gro_normal_batch");
| ^~~
In file included from /home/lhan/Projects/kgdboe/kgdboe_io.c:8:
At top level:
/home/lhan/Projects/kgdboe/tracewrapper.h:23:27: warning: ‘do_lookup_tracepoint’ defined but not used [-Wunused-function]
23 | static struct tracepoint *do_lookup_tracepoint(const char *tracepointName, const char *tracepointPtrName)
| ^~~~~~~~~~~~~~~~~~~~
CC [M] /home/lhan/Projects/kgdboe/nethook.o
In file included from /home/lhan/Projects/kgdboe/nethook.c:13:
/home/lhan/Projects/kgdboe/tracewrapper.h:23:27: warning: ‘do_lookup_tracepoint’ defined but not used [-Wunused-function]
23 | static struct tracepoint *do_lookup_tracepoint(const char *tracepointName, const char *tracepointPtrName)
| ^~~~~~~~~~~~~~~~~~~~
Getting following compiler warnings. Should I clean this up?