Commit 99ec383e authored by Marti Bolivar's avatar Marti Bolivar Committed by David Brown
Browse files

bootutil_misc: fix printf types in log macros

Upstream PR #547

The recent changes to these are tripping GCC printf-like macro
attribute warnings on my platform. Just cast all the values to ulong
to make everybody's compilers happy.

Signed-off-by: default avatarMarti Bolivar <marti.bolivar@nordicsemi.no>
parent e575b0b8
Loading
Loading
Loading
Loading
+10 −5
Changes for boot/bootutil/src/bootutil_misc.c: 10 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -408,7 +408,8 @@ boot_write_magic(const struct flash_area *fap)
    off = boot_magic_off(fap);

    BOOT_LOG_DBG("writing magic; fa_id=%d off=0x%lx (0x%lx)",
                 fap->fa_id, off, fap->fa_off + off);
                 fap->fa_id, (unsigned long)off,
                 (unsigned long)(fap->fa_off + off));
    rc = flash_area_write(fap, off, boot_img_magic, BOOT_MAGIC_SZ);
    if (rc != 0) {
        return BOOT_EFLASH;
@@ -465,7 +466,8 @@ boot_write_copy_done(const struct flash_area *fap)

    off = boot_copy_done_off(fap);
    BOOT_LOG_DBG("writing copy_done; fa_id=%d off=0x%lx (0x%lx)",
                 fap->fa_id, off, fap->fa_off + off);
                 fap->fa_id, (unsigned long)off,
                 (unsigned long)(fap->fa_off + off));
    return boot_write_trailer_flag(fap, off, BOOT_FLAG_SET);
}

@@ -476,7 +478,8 @@ boot_write_image_ok(const struct flash_area *fap)

    off = boot_image_ok_off(fap);
    BOOT_LOG_DBG("writing image_ok; fa_id=%d off=0x%lx (0x%lx)",
                 fap->fa_id, off, fap->fa_off + off);
                 fap->fa_id, (unsigned long)off,
                 (unsigned long)(fap->fa_off + off));
    return boot_write_trailer_flag(fap, off, BOOT_FLAG_SET);
}

@@ -496,7 +499,8 @@ boot_write_swap_info(const struct flash_area *fap, uint8_t swap_type,
    off = boot_swap_info_off(fap);
    BOOT_LOG_DBG("writing swap_info; fa_id=%d off=0x%lx (0x%lx), swap_type=0x%x"
                 " image_num=0x%x",
                 fap->fa_id, off, fap->fa_off + off, swap_type, image_num);
                 fap->fa_id, (unsigned long)off,
                 (unsigned long)(fap->fa_off + off), swap_type, image_num);
    return boot_write_trailer(fap, off, (const uint8_t *) &swap_info, 1);
}

@@ -507,7 +511,8 @@ boot_write_swap_size(const struct flash_area *fap, uint32_t swap_size)

    off = boot_swap_size_off(fap);
    BOOT_LOG_DBG("writing swap_size; fa_id=%d off=0x%lx (0x%lx)",
                 fap->fa_id, off, fap->fa_off + off);
                 fap->fa_id, (unsigned long)off,
                 (unsigned long)fap->fa_off + off);
    return boot_write_trailer(fap, off, (const uint8_t *) &swap_size, 4);
}