Skip to content

Compiler warnings when compiling EEPROM.h #3783

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nickgammon opened this issue Sep 12, 2015 · 11 comments
Closed

Compiler warnings when compiling EEPROM.h #3783

nickgammon opened this issue Sep 12, 2015 · 11 comments
Assignees
Labels
feature request A request to make an enhancement (not a bug fix) Library: EEPROM The EEPROM Arduino library Type: Duplicate Another item already exists for this topic

Comments

@nickgammon
Copy link

Under 1.6.4 of the IDE (and reportedly under nightly builds as well) compiling an EEPROM example gives this warning:

In file included from eeprom_get.ino:18:0:
/home/nick/Development/arduino-1.6.4/hardware/arduino/avr/libraries/EEPROM/EEPROM.h:43:30: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
     operator const uint8_t() const       { return **this; }
                              ^
/home/nick/Development/arduino-1.6.4/hardware/arduino/avr/libraries/EEPROM/EEPROM.h:92:26: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
     operator const int() const          { return index; }
                          ^

To fix, remove the first const from both of those lines.

@Chris--A
Copy link
Contributor

Cheers, in the update proposal I have in the works, all the warnings are fixed.

Once all the changes are pushed, I'll link here and add a post the dev mailing list. 👍

@cmaglie cmaglie added feature request A request to make an enhancement (not a bug fix) Library: EEPROM The EEPROM Arduino library labels Sep 22, 2015
@maxmclau
Copy link

Any update on this?

@Chris--A
Copy link
Contributor

Yeah, I have the updated files ready, I'll do up a PR after work tomorrow.

@glansberry
Copy link

glansberry commented Jan 12, 2017

Bump - problem is still there in 1.8.0. Need to compile with "All" warnings on to see it.

@Chris--A
Copy link
Contributor

This has been fixed and added to the next proposal (Chris--A@acbd8bc) here

@per1234
Copy link
Collaborator

per1234 commented Jul 4, 2017

@Chris--A I can't seem to find the pull request.

@per1234 per1234 marked this as a duplicate of #6534 Jul 19, 2017
@per1234 per1234 added the Waiting for feedback More information must be provided before we can proceed label Aug 5, 2017
@gtozzi
Copy link

gtozzi commented Dec 7, 2017

It looks like this is still present in 1.8.5

@szotsaki
Copy link

Any news on removing the two const qualifiers?

@d-a-v
Copy link
Contributor

d-a-v commented Apr 11, 2018

Do you think making a PR would help with this 2½ years old trivial fix ?

@nickgammon
Copy link
Author

It can't make things any slower. :)

@matthijskooijman
Copy link
Collaborator

I'm closing this in favor of arduino/ArduinoCore-avr#36 which describes the same issue, but is in the (by now) right repository (and has a PR with a fix).

@matthijskooijman matthijskooijman added Type: Duplicate Another item already exists for this topic and removed Waiting for feedback More information must be provided before we can proceed labels Aug 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A request to make an enhancement (not a bug fix) Library: EEPROM The EEPROM Arduino library Type: Duplicate Another item already exists for this topic
Projects
None yet
Development

No branches or pull requests

10 participants