From 96fb8bec85c5ca1b7fe66371a6bdf0cb5a314d75 Mon Sep 17 00:00:00 2001 From: Christopher Haster Date: Mon, 3 Jul 2023 12:14:36 -0500 Subject: [PATCH 1/3] Fixed release script breaking if there is no previous version This can't actually happen in the current state of the littlefs GitHub repo, but could in theory cause problems if CI is enabled on a fork. Found while enabling GitHub Actions on littlefs-fuse. --- .github/workflows/release.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c0d446df..61b29721 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 From d775b46e3d0b0eaf642878d002d203f4be9b6dfa Mon Sep 17 00:00:00 2001 From: Christopher Haster Date: Thu, 3 Aug 2023 11:16:40 -0500 Subject: [PATCH 2/3] Fixed integer conversion warning from Code Composer Studio Proposed by FiddlingBits --- lfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lfs.c b/lfs.c index 38b825dd..1b6876a6 100644 --- a/lfs.c +++ b/lfs.c @@ -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 From 5a834b6fc141ecc561d352545ec2d89f9e598b97 Mon Sep 17 00:00:00 2001 From: Mohammad Dahamshi Date: Tue, 11 Jul 2023 12:20:43 +0300 Subject: [PATCH 3/3] initlize struct lfs_diskoff disk = {0} so we don't use it uninitlized in first run --- lfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lfs.c b/lfs.c index 38b825dd..073f84c4 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) {