[U-Boot] [PATCH 1/1] tools: imx8image: use correct printf escape sequence

Stefano Babic sbabic at denx.de
Mon Jan 28 11:56:37 UTC 2019


On 02/01/19 20:11, Heinrich Schuchardt wrote:
> On 12/17/18 10:22 AM, Heinrich Schuchardt wrote:
>> core is of type uint64_t. So for printing we need "%"PRIu64 (not "%lu").
>>
>> Without the patch a warning is issued when building on a 32bit system.
>>
>> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
>> ---
>>  tools/imx8image.c | 7 +++++--
>>  1 file changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/tools/imx8image.c b/tools/imx8image.c
>> index 6e8ac464e7..f3158bc434 100644
>> --- a/tools/imx8image.c
>> +++ b/tools/imx8image.c
>> @@ -555,7 +555,8 @@ static void set_image_array_entry(flash_header_v3_t *container,
>>  		} else if (soc == QM && core == CORE_CA72) {
>>  			meta = IMAGE_A72_DEFAULT_META(custom_partition);
>>  		} else {
>> -			fprintf(stderr, "Error: invalid AP core id: %lu\n",
>> +			fprintf(stderr,
>> +				"Error: invalid AP core id: %" PRIu64 "\n",
>>  				core);
>>  			exit(EXIT_FAILURE);
>>  		}
>> @@ -577,7 +578,9 @@ static void set_image_array_entry(flash_header_v3_t *container,
>>  			core = CORE_CM4_1;
>>  			meta = IMAGE_M4_1_DEFAULT_META(custom_partition);
>>  		} else {
>> -			fprintf(stderr, "Error: invalid m4 core id: %lu\n", core);
>> +			fprintf(stderr,
>> +				"Error: invalid m4 core id: %" PRIu64 "\n",
>> +				core);
>>  			exit(EXIT_FAILURE);
>>  		}
>>  		img->hab_flags |= IMG_TYPE_EXEC;
>>
> 
> Hello Stefano,
> 
> in patchwork this patch has been assigned to you. Could you, please,
> review it.
> 

Patch is fine, it is merged in my private tree, I will push after I
complete current merge and buid on Travis will report success.

Regards,
Stefano



-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================


More information about the U-Boot mailing list