From b708976e1dce0d1ef12bc42ef8107552cab4c1e4 Mon Sep 17 00:00:00 2001 From: geky-bot Date: Sun, 3 Sep 2023 18:53:33 +0000 Subject: [PATCH] Squashed 'littlefs/' changes from 611c9b2..130790f 130790f Merge pull request #863 from littlefs-project/fix-conversion-warning 531d5e5 Merge pull request #855 from mdahamshi/mmd_fix e40d8f5 Merge pull request #849 from littlefs-project/fix-ci-release-no-version 5a834b6 initlize struct lfs_diskoff disk = {0} so we don't use it uninitlized in first run d775b46 Fixed integer conversion warning from Code Composer Studio 96fb8be Fixed release script breaking if there is no previous version git-subtree-dir: littlefs git-subtree-split: 130790fa915d104b5ca19524e86d9618fdcac848 --- .github/workflows/release.yml | 5 ++++- lfs.c | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c0d446d..61b2972 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -81,7 +81,9 @@ jobs: - name: find-prev-version continue-on-error: true run: | - LFS_PREV_VERSION="$(git describe --tags --abbrev=0 --match 'v*')" + LFS_PREV_VERSION="$( \ + git describe --tags --abbrev=0 --match 'v*' \ + || true)" echo "LFS_PREV_VERSION=$LFS_PREV_VERSION" echo "LFS_PREV_VERSION=$LFS_PREV_VERSION" >> $GITHUB_ENV @@ -240,6 +242,7 @@ jobs: run: | # create release and patch version tag (vN.N.N) # only draft if not a patch release + touch release.txt [ -e table.txt ] && cat table.txt >> release.txt echo >> release.txt [ -e changes.txt ] && cat changes.txt >> release.txt diff --git a/lfs.c b/lfs.c index 38b825d..f6b9655 100644 --- a/lfs.c +++ b/lfs.c @@ -877,7 +877,7 @@ static int lfs_dir_traverse(lfs_t *lfs, // iterate over directory and attrs lfs_tag_t tag; const void *buffer; - struct lfs_diskoff disk; + struct lfs_diskoff disk = {0}; while (true) { { if (off+lfs_tag_dsize(ptag) < dir->off) { @@ -1628,7 +1628,7 @@ static int lfs_dir_commitcrc(lfs_t *lfs, struct lfs_commit *commit) { } // space for fcrc? - uint8_t eperturb = -1; + uint8_t eperturb = (uint8_t)-1; if (noff >= end && noff <= lfs->cfg->block_size - lfs->cfg->prog_size) { // first read the leading byte, this always contains a bit // we can perturb to avoid writes that don't change the fcrc