AVR C Runtime Library - Bugs: bug #24207, Example in inttypes.h is wrong
You are not allowed to post comments on this tracker with your current authentication level.
bug #24207: Example in inttypes.h is wrong
Submitter: | Carl Lang <charlybravo> | ||
Submitted: | Thu 04 Sep 2008 10:27:08 PM UTC | ||
Category: | Documentation | Severity: | 3 - Normal |
Priority: | 5 - Normal | Item Group: | Documentation |
Status: | Fixed | Assigned to: | arcanum |
Percent Complete: | 100% | Open/Closed: | Closed |
Release: | 1.6.1 | Fixed Release: | 1.7.0 |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
Carbon-Copy List
Follow 6 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2008-10-17 | arcanum | Status | None | Fixed | |
Percent Complete | 0% | 100% | |||
Assigned to | None | arcanum | |||
Open/Closed | Open | Closed | |||
Fixed Release | None | 1.7.0 | |||
2008-09-04 | charlybravo | Carbon-Copy | Removed 65388 | - |
Powered by Savane 3.13-02a9.
Corresponding source code
The current example in the inttypes.h header contains the following line:
printf("The hexadecimal value of smallval is " PRIx8
", the decimal value of longval is " PRId32 ".\n",
smallval, longval);
That should be
printf("The hexadecimal value of smallval is %" PRIx8
", the decimal value of longval is %" PRId32 ".\n",
smallval, longval);
Note the two additional '%' characters, completing the format specification from the macros.