diff options
author | Pablo Barciela <[email protected]> | 2019-08-24 01:39:09 +0200 |
---|---|---|
committer | ZenWalker <[email protected]> | 2019-08-28 20:56:40 +0200 |
commit | 996e372b1b8dfad2d2cecd219ddc6c25a6cb36f9 (patch) | |
tree | 5b9a02e6ccac58413c16a93280a83f5bbb3320c7 | |
parent | 4f7b30daa3231a4a6e479442759bb73752896d10 (diff) | |
download | pluma-996e372b1b8dfad2d2cecd219ddc6c25a6cb36f9.tar.bz2 pluma-996e372b1b8dfad2d2cecd219ddc6c25a6cb36f9.tar.xz |
pluma-document: avoid garbarge value in 'file_with_bom' function
Fixes clang analyzer warning:
pluma-document.c:682:14: warning: The left operand of '==' is a garbage value
if ((bom[0] == '\357') &&
~~~~~~ ^
-rw-r--r-- | pluma/pluma-document.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pluma/pluma-document.c b/pluma/pluma-document.c index 2ae087b3..21a2c68b 100644 --- a/pluma/pluma-document.c +++ b/pluma/pluma-document.c @@ -655,6 +655,8 @@ file_with_bom (GFile *file) gchar bom[3]; gchar *file_path; + bom[0] = bom[1] = bom[2] = 0; + file_path = g_file_get_path (file); testfile = fopen (file_path, "r"); |