[Bf-blender-cvs] [cecb25273ec] master: Cleanup: Font, added initialisation for two variables

Sybren A. Stüvel noreply at git.blender.org
Fri Apr 3 11:34:35 CEST 2020


Commit: cecb25273ec6f473d3f8ae0b201e17a77225dd93
Author: Sybren A. Stüvel
Date:   Fri Apr 3 11:33:21 2020 +0200
Branches: master
https://developer.blender.org/rBcecb25273ec6f473d3f8ae0b201e17a77225dd93

Cleanup: Font, added initialisation for two variables

My compiler (GCC 7.5.0) was warning about these variables potentially not
being initialised. Since the function is highly complex, instead of
analysing it I just trust my compiler and added initial values.

This should be no functional change.

===================================================================

M	source/blender/blenkernel/intern/font.c

===================================================================

diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c
index e25603e0af5..a4da7ceb861 100644
--- a/source/blender/blenkernel/intern/font.c
+++ b/source/blender/blenkernel/intern/font.c
@@ -734,7 +734,7 @@ static bool vfont_to_curve(Object *ob,
   float twidth = 0, maxlen = 0;
   int i, slen, j;
   int curbox;
-  int selstart, selend;
+  int selstart = 0, selend = 0;
   int cnr = 0, lnr = 0, wsnr = 0;
   const char32_t *mem = NULL;
   char32_t ascii;



More information about the Bf-blender-cvs mailing list