diff options
author | Pablo Barciela <[email protected]> | 2019-08-24 01:39:09 +0200 |
---|---|---|
committer | monsta <[email protected]> | 2020-02-13 14:02:54 +0300 |
commit | 615ecfdd401c70bdf9faaf3e3125f793d76476bf (patch) | |
tree | 992a22b01a10103fa16323c76954fa54be58dd21 | |
parent | ac964e63be856db9ffa61fa2b9bc578a2bfb77b4 (diff) | |
download | pluma-615ecfdd401c70bdf9faaf3e3125f793d76476bf.tar.bz2 pluma-615ecfdd401c70bdf9faaf3e3125f793d76476bf.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 b9519b25..11a5dc65 100644 --- a/pluma/pluma-document.c +++ b/pluma/pluma-document.c @@ -659,6 +659,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"); |