[misc] fix 32-bit arithmetic overflow operation warnings

* Also disable C28251 annotation warning
This commit is contained in:
Pete Batard 2020-02-12 17:23:23 +00:00
parent 67d324f82b
commit 65523bbdf9
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
21 changed files with 53 additions and 48 deletions

View file

@ -967,6 +967,10 @@ errcode_t ext2fs_write_inode2(ext2_filsys fs, ext2_ino_t ino,
if ((offset + length) > fs->blocksize)
clen = fs->blocksize - offset;
if (!fs->icache) {
retval = EXT2_ET_GDESC_READ;
goto errout;
}
if (fs->icache->buffer_blk != block_nr) {
retval = io_channel_read_blk64(fs->io, block_nr, 1,
fs->icache->buffer);