Closed sc0w closed 5 years ago
No idea, if this is the right fix for it, but it seems the warning is gone.
A possibly more interesting test is a file with less than 3 bytes, maybe even just for fun:
$ echo -ne '\xEF\xBB' > file.utf8
$ file file.utf8
file.utf8: ISO-8859 text, with no line terminators
$ pluma file.utf8
Possibly one out of many times it would think the file has a BOM.
Fixes clang analyzer warning:
In the tests, make sure you can't reproduce the issue https://github.com/mate-desktop/pluma/issues/301