Hi All,

 

Back in September Scott posted a query to the group related to a patch he has created relating to printf format specifiers and some of the maintainers from Arm have reservations about and we asked him to get opinions from the broader project community as his patch changes a number of different platforms as well as core code.

 

I’m trying to help him reinvigorate the discussion so reposting his request with patch link below that had stalled.

 

Joanna

 

 

 


 

Scott Branden scott.branden at broadcom.com 
Mon Sep 14 18:34:45 UTC 2020

 
 
Hello,
 
ATF currently uses non-portable printf format specifiers for fixed width types defined in stdint.h
In addition, ATF redefines types defined in gcc for stdint.h with its own custom types causing additional issues.
 
This causes compilation issues when porting code to/from ATF.
AND, generates coverity parse errors as int64_t and uint64_t are incorrectly defined in ATF vs. gcc for aarch64.
 
The printf format specifiers in inttypes.h are to be used for the proper format specifiers.
And, uint64_t/int64_t should be defined the same as in gcc.
 
I tried fixing up all the instances of int64 printf format specifiers by introducing inttypes.h and redefined the stdint types correctly here:
https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/5437
 
We have checked the change into our local tree so that everything compiles and runs in our system.  Please accept change upstream.
 
Regards,
Scott