fileops: fix invalid read
diff: fix warning
Merge pull request #1652 from yorah/fix/build-warnings

Fix/build warnings