From 75642ca07a69acfe73fca081c5330b6924b80fdf Mon Sep 17 00:00:00 2001 From: Alexey Lapshin Date: Mon, 6 Feb 2023 11:36:43 +0700 Subject: [PATCH] vfs: fix gcc-12 compile errors --- components/vfs/vfs_semihost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/vfs/vfs_semihost.c b/components/vfs/vfs_semihost.c index 267f85cafc..f1af8fb992 100644 --- a/components/vfs/vfs_semihost.c +++ b/components/vfs/vfs_semihost.c @@ -326,7 +326,7 @@ static DIR* vfs_semihost_opendir(void* ctx, const char *restrict path) return NULL; } - strncpy(semihost_dirp->path, path, MIN(strlen(path), sizeof(semihost_dirp->path) - 1)); + strncpy(semihost_dirp->path, path, sizeof(semihost_dirp->path) - 1); ESP_LOGV(TAG, "%s: '%s'", __func__, path); int ret_fd = semihosting_opendir(path, (int)&semihost_dirp->id); if (ret_fd < 0) {