You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gcc correctly warns about a couple of dodgy casts when building Apex with -Wcast-qual.
In file included from /home/patrick/src/motec/adr2/apex/sys/include/arch.h:39,
from /home/patrick/src/motec/adr2/apex/sys/kern/syslog.c:8:
/home/patrick/src/motec/adr2/apex/sys/kern/syslog.c: In function 'syslog_output':
/home/patrick/src/motec/adr2/apex/sys/include/compiler.h:108:4: warning: to be safe all intermediate pointers in cast from 'void (**)(void)' to 'void (* volatile*)(void)' must be 'const' qualified [-Wcast-qual]
108 | *(volatile typeof(*(p)) *)(p) = v; \
| ^
/home/patrick/src/motec/adr2/apex/sys/kern/syslog.c:276:2: note: in expansion of macro 'write_once'
276 | write_once(&log_output, fn);
| ^~~~~~~~~~
/home/patrick/src/motec/adr2/apex/sys/arch/arm/v7m/context.c: In function 'fpu_load':
/home/patrick/src/motec/adr2/apex/sys/arch/arm/v7m/context.c:329:12: warning: cast discards 'const' qualifier from pointer target type [-Wcast-qual]
329 | : : "m"(*(const uint32_t(*)[16])(f->regs + 16)), "r"(f->regs + 16));
| ^
The text was updated successfully, but these errors were encountered:
gcc correctly warns about a couple of dodgy casts when building Apex with -Wcast-qual.
The text was updated successfully, but these errors were encountered: