[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-libc-dev] Avr-libc Bug #19055
From: |
Eric Weddington |
Subject: |
[avr-libc-dev] Avr-libc Bug #19055 |
Date: |
Fri, 30 Mar 2007 10:03:33 -0600 |
Hi Joerg,
Error with function eeprom_write_word
<https://savannah.nongnu.org/bugs/?19055>
This looks like not a bug to me, but the OP mentioned that you suggested
that he file a bug report.
"Code:
const uint16_t EEMEM EE_EQID;
...
eeprom_write_word(&EE_EQID,(uint16_t)usRegBuf[MB_EQID]);
End Code
that generate the following compiler warning.
Quote:
../MicroTransTempReg.c:153: warning: passing argument 1 of
'eeprom_write_word' discards qualifiers from pointer target type
End quote
I removed the "const" declaration and this removed the warning message.
However, Jörg suggested to file a a bug report."
The eeprom_write_word() function correctly needs a pointer to a uint16_t (in
the first parameter). So the OP took the address of a const uint16_t, which
I would think is in correct as the eeprom_write_word() function does have to
modify the value pointed to and so must remove the const.
Am I just missing something?
Thanks,
Eric Weddington
- [avr-libc-dev] Avr-libc Bug #19055,
Eric Weddington <=