diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-09-13 17:18:18 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-09-13 17:51:51 +0300 |
commit | 6b0d1ef7e118f679fb5dacac184a7e72fef6142e (patch) | |
tree | c514f73902d4b533104ff182047ffe2373691c4c /source/blender/blenfont | |
parent | 27b82bbb75c5fd527b6b22682f8d173f6040644a (diff) |
Cleanup: compiler warnings
Diffstat (limited to 'source/blender/blenfont')
-rw-r--r-- | source/blender/blenfont/intern/blf_font.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c index 1369240f0e2..d75da6a126f 100644 --- a/source/blender/blenfont/intern/blf_font.c +++ b/source/blender/blenfont/intern/blf_font.c @@ -312,6 +312,9 @@ static void blf_font_ensure_ascii_kerning(FontBLF *font, const FT_UInt kern_mode _g = blf_glyph_add(_font, FT_Get_Char_Index((_font)->face, _c), _c); \ } \ } \ + else { \ + _g = NULL; \ + } \ (void)0 #define BLF_KERNING_VARS(_font, _has_kerning, _kern_mode) \ @@ -677,7 +680,7 @@ static bool blf_font_width_to_strlen_glyph_process(FontBLF *font, size_t blf_font_width_to_strlen( FontBLF *font, const char *str, size_t len, float width, float *r_width) { - unsigned int c, c_prev; + unsigned int c, c_prev = BLI_UTF8_ERR; GlyphBLF *g, *g_prev; int pen_x, width_new; size_t i, i_prev; @@ -711,7 +714,7 @@ size_t blf_font_width_to_strlen( size_t blf_font_width_to_rstrlen( FontBLF *font, const char *str, size_t len, float width, float *r_width) { - unsigned int c, c_prev; + unsigned int c, c_prev = BLI_UTF8_ERR; GlyphBLF *g, *g_prev; int pen_x, width_new; size_t i, i_prev, i_tmp; |