AVR C Runtime Library - Bugs: bug #21183, Bug in Chapter "Data in...
You are not allowed to post comments on this tracker with your current authentication level.
bug #21183: Bug in Chapter "Data in Program Space"
Submitter: | None | ||
Submitted: | Fri 28 Sep 2007 02:57:12 PM UTC | ||
Category: | Documentation | Severity: | 3 - Normal |
Priority: | 7 - High | Item Group: | None |
Status: | Fixed | Assigned to: | arcanum |
Percent Complete: | 100% | Originator Email: | -email is unavailable- |
Open/Closed: | Closed | Release: | None |
Fixed Release: | None |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
Carbon-Copy List
Follow 5 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2007-10-02 | arcanum | Status | None | Fixed | |
2007-10-02 | arcanum | Percent Complete | 0% | 100% | |
Open/Closed | Open | Closed | |||
2007-09-28 | arcanum | Priority | 5 - Normal | 7 - High | |
Assigned to | None | arcanum |
Powered by Savane 3.13-d3ae.
Corresponding source code
In "Storing and Retrieving Strings in the Program Space" you'll find the following line in an example:
strcpy_P(buffer, pgm_read_word(&(string_table[i])));
This leads to a compiler warning and non-working code:
test0.c:26: warning: passing argument 2 of 'strcpy_P' makes pointer from
integer without a cast
Correct code line would be:
strcpy_P(buffer, (PGM_P) pgm_read_word (string_table+i));
or proposed by Joerg Wunsch in a german forum:
strcpy_P(buffer, (PGM_P)pgm_read_word(&(string_table[i])));
Regards,
AndyP.