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
Two methods in libraries/EEPROM/src/EEPROM.h produce the following compiler warnings:
/home/brian/dev/arduino-1.8.5/portable/packages/arduino/hardware/avr/1.6.21/libraries/EEPROM/src/EEPROM.h:43:30: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
operator const uint8_t() const { return **this; }
^
/home/brian/dev/arduino-1.8.5/portable/packages/arduino/hardware/avr/1.6.21/libraries/EEPROM/src/EEPROM.h:92:26: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
operator const int() const { return index; }
^
The compiler places the ^ symbol on the second const, right after the (). But the compiler is confused. The problem is actually the first const, which is not needed because these two methods return by value, instead of returning by pointer or reference.
The solution is to simply remove the first const.
It would be nice to get rid of these spurious compiler warnings, because they interfere with debugging when there are other compiler errors or warnings in a program. I always have to remember to skip over these 2 spurious warnings, which can sometimes be visually difficult to do when mixed in with hundreds of other compiler warnings. It's also particularly annoying because these 2 warnings are often the very first warning/error messages, and I'm usually interested in the very first compiler errors, except that these two messages are always right at the top.
I will send a PR shortly after filing this.
The text was updated successfully, but these errors were encountered:
Two methods in
libraries/EEPROM/src/EEPROM.h
produce the following compiler warnings:The compiler places the
^
symbol on the secondconst
, right after the()
. But the compiler is confused. The problem is actually the firstconst
, which is not needed because these two methods return by value, instead of returning by pointer or reference.The solution is to simply remove the first
const
.It would be nice to get rid of these spurious compiler warnings, because they interfere with debugging when there are other compiler errors or warnings in a program. I always have to remember to skip over these 2 spurious warnings, which can sometimes be visually difficult to do when mixed in with hundreds of other compiler warnings. It's also particularly annoying because these 2 warnings are often the very first warning/error messages, and I'm usually interested in the very first compiler errors, except that these two messages are always right at the top.
I will send a PR shortly after filing this.
The text was updated successfully, but these errors were encountered: