[libbluray-devel] BDFontMetrics: initialize fields to avoid warnings with static analyzer

hpi1 git at videolan.org
Mon Nov 17 13:09:44 CET 2014


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Mon Nov 17 11:17:12 2014 +0200| [bff98d7276e6eb6d051fc2f35820a31bf6eae86b] | committer: hpi1

BDFontMetrics: initialize fields to avoid warnings with static analyzer

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=bff98d7276e6eb6d051fc2f35820a31bf6eae86b
---

 src/libbluray/bdj/java/java/awt/BDFontMetrics.java |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/libbluray/bdj/java/java/awt/BDFontMetrics.java b/src/libbluray/bdj/java/java/awt/BDFontMetrics.java
index df08595..f149420 100644
--- a/src/libbluray/bdj/java/java/awt/BDFontMetrics.java
+++ b/src/libbluray/bdj/java/java/awt/BDFontMetrics.java
@@ -207,11 +207,11 @@ public class BDFontMetrics extends FontMetrics {
         discFontNameMap.remove(name);
     }
 
-    private long ftFace;
-    private int ascent;
-    private int descent;
-    private int leading;
-    private int maxAdvance;
+    private long ftFace = 0;
+    private int ascent = 0;
+    private int descent = 0;
+    private int leading = 0;
+    private int maxAdvance = 0;
 
     /** Cache of first 256 Unicode characters as these map to ASCII characters and are often used. */
     private int[] widths;



More information about the libbluray-devel mailing list