Merge pull request #863 from littlefs-project/fix-conversion-warning

Fix integer conversion warning from Code Composer Studio
This commit is contained in:
Christopher Haster 2023-09-03 12:46:38 -05:00 committed by GitHub
commit 130790fa91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

2
lfs.c
View File

@ -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