wchar_t warnings
Got a few of these warnings when compiling it into my code based on BakingPi.
arm-none-eabi-ld --no-undefined build/_start.o build/mailbox.o build/printk.o build/fb.o b
uild/gpio.o build/font_8x8.o build/fb_test.o build/main.o build/led.o build/timer.o -Map k
ernel.map -L libs -lcsud -o build/output.elf -T kernel.ld
arm-none-eabi-ld: warning: libs/libcsud.a(device.keyboard.c.o) uses 2-byte wchar_t yet the
output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
arm-none-eabi-ld: Warning: libs/libcsud.a(device.keyboard.c.o): Unknown EABI object attrib
ute 44
I see -fshort-wchar is used. Any reason for that? Should I include it also in my makefile?
Thanks for this driver (and your tutorial!). (Hit ctrl-enter accidentally.. Sorry for the partial submit)
I think the short wchar is used as the USB standard makes use of 16 bit unicode for various reasons and it was convenient. Perhaps I should've considered compatibility a little more carefully. Either way I don't think any useful exported methods will have arguments that are wchars and I don't think any useful structures do either, so it should be safe to ignore. If in doubt my code could be refactored to remove any wchars and replace with unsigned shorts.
I haven't had any problems with it. It's just somewhat annoying, as the warnings floods my terminal and I have to scroll in order to make sure my own code compiles clean (I use -Wall).