8005796: [parfait] Possible uninitialised variable at jdk/src/share/native/sun/java2d/loops/ByteBinary1Bit.c
authorjgodinez
Fri, 22 Feb 2013 13:20:16 -0800
changeset 15970 068f2b5c2145
parent 15969 c7ed36e13460
child 15972 8eaecbafd49d
8005796: [parfait] Possible uninitialised variable at jdk/src/share/native/sun/java2d/loops/ByteBinary1Bit.c Reviewed-by: prr, vadim, flar Contributed-by: jia-hong.chen@oracle.com
jdk/src/share/native/sun/java2d/loops/AnyByteBinary.h
jdk/src/share/native/sun/java2d/loops/ByteIndexed.h
jdk/src/share/native/sun/java2d/loops/IntArgb.h
jdk/src/share/native/sun/java2d/loops/IntArgbBm.h
jdk/src/share/native/sun/java2d/loops/IntArgbPre.h
jdk/src/share/native/sun/java2d/loops/Ushort4444Argb.h
jdk/src/share/native/sun/java2d/loops/UshortIndexed.h
--- a/jdk/src/share/native/sun/java2d/loops/AnyByteBinary.h	Fri Feb 22 11:01:23 2013 -0800
+++ b/jdk/src/share/native/sun/java2d/loops/AnyByteBinary.h	Fri Feb 22 13:20:16 2013 -0800
@@ -153,7 +153,10 @@
     jint PREFIX ## rgb;
 
 #define InitByteBinaryAlphaLoadData(TYPE, PREFIX, pRasInfo) \
-    PREFIX ## Lut = (pRasInfo)->lutBase
+    do { \
+        PREFIX ## Lut = (pRasInfo)->lutBase; \
+        PREFIX ## rgb = 0; \
+    } while (0)
 
 #define LoadAlphaFromByteBinaryFor4ByteArgb(TYPE, pRas, PREFIX, COMP_PREFIX) \
     do { \
--- a/jdk/src/share/native/sun/java2d/loops/ByteIndexed.h	Fri Feb 22 11:01:23 2013 -0800
+++ b/jdk/src/share/native/sun/java2d/loops/ByteIndexed.h	Fri Feb 22 13:20:16 2013 -0800
@@ -202,7 +202,10 @@
     jint PREFIX ## rgb;
 
 #define InitByteIndexedAlphaLoadData(PREFIX, pRasInfo) \
-    PREFIX ## Lut = (pRasInfo)->lutBase
+    do { \
+        PREFIX ## Lut = (pRasInfo)->lutBase; \
+        PREFIX ## rgb = 0; \
+    } while (0)
 
 #define LoadAlphaFromByteIndexedFor4ByteArgb(pRas, PREFIX, COMP_PREFIX) \
     do { \
--- a/jdk/src/share/native/sun/java2d/loops/IntArgb.h	Fri Feb 22 11:01:23 2013 -0800
+++ b/jdk/src/share/native/sun/java2d/loops/IntArgb.h	Fri Feb 22 13:20:16 2013 -0800
@@ -122,7 +122,8 @@
 #define DeclareIntArgbAlphaLoadData(PREFIX) \
     jint PREFIX;
 
-#define InitIntArgbAlphaLoadData(PREFIX, pRasInfo)
+#define InitIntArgbAlphaLoadData(PREFIX, pRasInfo) \
+    PREFIX = 0
 
 #define LoadAlphaFromIntArgbFor4ByteArgb(pRas, PREFIX, COMP_PREFIX) \
     do { \
--- a/jdk/src/share/native/sun/java2d/loops/IntArgbBm.h	Fri Feb 22 11:01:23 2013 -0800
+++ b/jdk/src/share/native/sun/java2d/loops/IntArgbBm.h	Fri Feb 22 13:20:16 2013 -0800
@@ -133,7 +133,8 @@
 #define DeclareIntArgbBmAlphaLoadData(PREFIX) \
     jint PREFIX;
 
-#define InitIntArgbBmAlphaLoadData(PREFIX, pRasInfo)
+#define InitIntArgbBmAlphaLoadData(PREFIX, pRasInfo) \
+    PREFIX = 0
 
 #define LoadAlphaFromIntArgbBmFor4ByteArgb(pRas, PREFIX, COMP_PREFIX) \
     do { \
--- a/jdk/src/share/native/sun/java2d/loops/IntArgbPre.h	Fri Feb 22 11:01:23 2013 -0800
+++ b/jdk/src/share/native/sun/java2d/loops/IntArgbPre.h	Fri Feb 22 13:20:16 2013 -0800
@@ -153,7 +153,8 @@
 #define DeclareIntArgbPreAlphaLoadData(PREFIX) \
     jint PREFIX;
 
-#define InitIntArgbPreAlphaLoadData(PREFIX, pRasInfo)
+#define InitIntArgbPreAlphaLoadData(PREFIX, pRasInfo) \
+    PREFIX = 0
 
 #define LoadAlphaFromIntArgbPreFor4ByteArgb(pRas, PREFIX, COMP_PREFIX) \
     do { \
--- a/jdk/src/share/native/sun/java2d/loops/Ushort4444Argb.h	Fri Feb 22 11:01:23 2013 -0800
+++ b/jdk/src/share/native/sun/java2d/loops/Ushort4444Argb.h	Fri Feb 22 13:20:16 2013 -0800
@@ -120,7 +120,8 @@
 #define DeclareUshort4444ArgbAlphaLoadData(PREFIX) \
     jint PREFIX;
 
-#define InitUshort4444ArgbAlphaLoadData(PREFIX, pRasInfo)
+#define InitUshort4444ArgbAlphaLoadData(PREFIX, pRasInfo) \
+    PREFIX = 0
 
 #define LoadAlphaFromUshort4444ArgbFor4ByteArgb(pRas, PREFIX, COMP_PREFIX) \
     do { \
--- a/jdk/src/share/native/sun/java2d/loops/UshortIndexed.h	Fri Feb 22 11:01:23 2013 -0800
+++ b/jdk/src/share/native/sun/java2d/loops/UshortIndexed.h	Fri Feb 22 13:20:16 2013 -0800
@@ -170,7 +170,10 @@
     jint PREFIX ## rgb;
 
 #define InitUshortIndexedAlphaLoadData(PREFIX, pRasInfo) \
-    PREFIX ## Lut = (pRasInfo)->lutBase
+    do { \
+        PREFIX ## Lut = (pRasInfo)->lutBase; \
+        PREFIX ## rgb = 0; \
+    } while (0)
 
 #define LoadAlphaFromUshortIndexedFor4ByteArgb(pRas, PREFIX, COMP_PREFIX) \
     do { \