Merge pull request #675 from kevinior/lfs_file_rawopen_nomalloc

Fix unused function warning with LFS_NO_MALLOC
This commit is contained in:
Christopher Haster
2022-11-10 10:31:04 -06:00
committed by GitHub
+2
View File
@@ -2998,12 +2998,14 @@ cleanup:
return err; return err;
} }
#ifndef LFS_NO_MALLOC
static int lfs_file_rawopen(lfs_t *lfs, lfs_file_t *file, static int lfs_file_rawopen(lfs_t *lfs, lfs_file_t *file,
const char *path, int flags) { const char *path, int flags) {
static const struct lfs_file_config defaults = {0}; static const struct lfs_file_config defaults = {0};
int err = lfs_file_rawopencfg(lfs, file, path, flags, &defaults); int err = lfs_file_rawopencfg(lfs, file, path, flags, &defaults);
return err; return err;
} }
#endif
static int lfs_file_rawclose(lfs_t *lfs, lfs_file_t *file) { static int lfs_file_rawclose(lfs_t *lfs, lfs_file_t *file) {
#ifndef LFS_READONLY #ifndef LFS_READONLY