Closed GoogleCodeExporter closed 9 years ago
The const qualifier is required or compilation will fail with
In file included from
/opt/cross/avr/lib64/gcc/avr/4.6.3/../../../../avr/include/inttypes.h:37:0,
from /opt/cross/avr/lib64/gcc/avr/4.6.3/../../../../avr/include/avr/pgmspace.h:86,
from /usr/local/pckg/arduino/arduino-1.0.1/hardware/arduino/cores/arduino/Arduino.h:8,
from output/Seismograph.cpp:3:
/opt/cross/avr/lib64/gcc/avr/4.6.3/include/stdint.h:3:3: warning: #include_next
is a GCC extension [enabled by default]
In file included from output/Seismograph.cpp:135:0:
/home/volker/sketchbook/libraries/Streaming/Streaming.h:84:15: warning: unused
parameter 'arg' [-Wunused-parameter]
output/Seismograph.cpp: In function 'void printInfo()':
output/Seismograph.cpp:473:8: error: reinterpret_cast from type 'const char*'
to type '__FlashStringHelper*' casts away qualifiers
Interestingly, the fix is in arduino IDE 1.0, but missing in 1.0.1.
The correct version is
#define F(string_literal) (reinterpret_cast<const __FlashStringHelper
*>(PSTR(string_literal)))
Original comment by gooc...@top.geek.nz
on 29 Jul 2012 at 5:41
Patch attached
Original comment by gooc...@top.geek.nz
on 29 Jul 2012 at 5:50
Attachments:
Sorry, it's missing in IDE 1.0 as well - it was me who added it there some time
ago... *vbg*
Original comment by gooc...@top.geek.nz
on 29 Jul 2012 at 6:31
https://github.com/arduino/Arduino/commit/bc79a998e99d229c4add23e8075995119d5454
85
Original comment by dmel...@gmail.com
on 21 Aug 2012 at 2:14
Original issue reported on code.google.com by
mkwi...@gmail.com
on 23 Mar 2012 at 5:40