Commit 6272d303 authored by Dominik Ermel's avatar Dominik Ermel Committed by Christopher Friedt
Browse files

samples/littlefs: Remove FIXME with PRIxPTR usage

With "Incompatible (u)intptr_t type and PRIxPTR definitions",
https://github.com/zephyrproject-rtos/zephyr/issues/37718

,
issue resolved the FIXME code is no longer needed.

Signed-off-by: default avatarDominik Ermel <dominik.ermel@nordicsemi.no>
parent ac9bb33a
Loading
Loading
Loading
Loading
+1 −12
Original line number Diff line number Diff line
@@ -14,16 +14,6 @@
#include <fs/littlefs.h>
#include <storage/flash_map.h>

/*
 * FIXME: The Zephyr always overrides uintptr_t as long int, which causes type size mismatch with
 * 32bit tools that may define PRIuPTR as "u".
 * See: include/toolchain/zephyr_stdint.h.
 * The UINTPTR_T_CAST should be replaced with cast to uintptr_t when this thing gets fixed.
 */
#undef PRIuPTR
#define PRIuPTR		"lu"
#define UINTPTR_T_CAST(t)	((unsigned long)(t))

/* Matches LFS_NAME_MAX */
#define MAX_PATH_LEN 255

@@ -84,8 +74,7 @@ void main(void)
	rc = fs_mount(mp);
	if (rc < 0) {
		printk("FAIL: mount id %" PRIuPTR " at %s: %d\n",
		       UINTPTR_T_CAST(mp->storage_dev), mp->mnt_point,
		       rc);
		       (uintptr_t)mp->storage_dev, mp->mnt_point, rc);
		return;
	}
	printk("%s mount: %d\n", mp->mnt_point, rc);