소스 검색

vfs: fix gcc-12 compile errors

Alexey Lapshin 3 년 전
부모
커밋
75642ca07a
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      components/vfs/vfs_semihost.c

+ 1 - 1
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) {