bugAVR 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

Thu 04 Sep 2008 10:27:08 PM UTC, original submission:  

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.

Carl Lang <charlybravo>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by arcanum (Updated the item)
  •  

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-10-17 arcanum StatusNone Fixed
        Percent Complete0% 100%
        Assigned toNone arcanum
        Open/ClosedOpen Closed
        Fixed ReleaseNone 1.7.0
    2008-09-04 charlybravo Carbon-CopyRemoved 65388 -

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code