From ca92ecafa7b2c619caaf598c35cff10298bcf62a Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 14 Dec 2016 17:44:12 -0600 Subject: [PATCH] MMC/SD: Format changed from %d to %lu. Must cast argument to unsigned long to avoid crash on 64-bit machine. --- drivers/mmcsd/mmcsd_sdio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/mmcsd/mmcsd_sdio.c b/drivers/mmcsd/mmcsd_sdio.c index 5c6df6874b..ae4bb7a0d1 100644 --- a/drivers/mmcsd/mmcsd_sdio.c +++ b/drivers/mmcsd/mmcsd_sdio.c @@ -909,7 +909,7 @@ static void mmcsd_decodeCID(FAR struct mmcsd_state_s *priv, uint32_t cid[4]) finfo("mid: %02x oid: %04x pnm: %s prv: %d psn: %lu mdt: %02x crc: %02x\n", decoded.mid, decoded.oid, decoded.pnm, decoded.prv, - decoded.psn, decoded.mdt, decoded.crc); + (unsigned long)decoded.psn, decoded.mdt, decoded.crc); } #endif @@ -2248,7 +2248,8 @@ static int mmcsd_geometry(FAR struct inode *inode, struct geometry *geometry) geometry->geo_mediachanged ? "true" : "false", geometry->geo_writeenabled ? "true" : "false"); finfo("nsectors: %lu sectorsize: %d\n", - (long)geometry->geo_nsectors, geometry->geo_sectorsize); + ((unsigned long))geometry->geo_nsectors, + geometry->geo_sectorsize); priv->mediachanged = false; ret = OK;