Closed mettworks closed 6 years ago
Hello,
I've got a compiler warning with the library :-(, but, It work as expected. :-)
I'm using the GCC Version 6.4. Could you please give me a hint for fixing? I don't like warnings. :-)
Kind regards, André Compiling: KS0108.c avr-gcc -c -mmcu=atmega128 -I. -gdwarf-2 -DF_CPU=18432000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=KS0108.lst -std=gnu99 -DF_OSC= -MD -MP -MF .dep/KS0108.o.d KS0108.c -o KS0108.o KS0108.c: In function 'GLCD_SetFont': KS0108.c:765:20: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] __GLCD.Font.Name = Name;
Compiling: KS0108.c avr-gcc -c -mmcu=atmega128 -I. -gdwarf-2 -DF_CPU=18432000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=KS0108.lst -std=gnu99 -DF_OSC= -MD -MP -MF .dep/KS0108.o.d KS0108.c -o KS0108.o KS0108.c: In function 'GLCD_SetFont': KS0108.c:765:20: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] __GLCD.Font.Name = Name;
I have fixed the warning by casting the "const pointer" to a regular pointer. You can redownload the library and use it.
Hello,
I've got a compiler warning with the library :-(, but, It work as expected. :-)
I'm using the GCC Version 6.4. Could you please give me a hint for fixing? I don't like warnings. :-)
Kind regards, André
Compiling: KS0108.c avr-gcc -c -mmcu=atmega128 -I. -gdwarf-2 -DF_CPU=18432000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=KS0108.lst -std=gnu99 -DF_OSC= -MD -MP -MF .dep/KS0108.o.d KS0108.c -o KS0108.o KS0108.c: In function 'GLCD_SetFont': KS0108.c:765:20: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] __GLCD.Font.Name = Name;