]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
tools: imx8image: use correct printf escape sequence
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Mon, 17 Dec 2018 09:22:21 +0000 (10:22 +0100)
committerStefano Babic <sbabic@denx.de>
Mon, 28 Jan 2019 11:55:14 +0000 (12:55 +0100)
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@gmx.de>
tools/imx8image.c

index 435f308b99e0ea481e0deba07c63937c10499fff..2ccc0cccb4d5007222f32ba8134d00b53548fb82 100644 (file)
@@ -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;