File openjdk-6-src-b17-no-efect.patch of Package java-1_6_0-openjdk.1035

Index: icedtea6-1.7/openjdk/hotspot/src/share/vm/utilities/globalDefinitions.hpp
===================================================================
--- icedtea6-1.7.orig/openjdk/hotspot/src/share/vm/utilities/globalDefinitions.hpp
+++ icedtea6-1.7/openjdk/hotspot/src/share/vm/utilities/globalDefinitions.hpp
@@ -344,8 +344,9 @@ inline bool is_object_aligned(intptr_t o
 //----------------------------------------------------------------------------------------------------
 // Utility macros for compilers
 // used to silence compiler warnings
+// suppress also statement has no effect
 
-#define Unused_Variable(var) var
+#define Unused_Variable(var) (var) = (var)
 
 
 //----------------------------------------------------------------------------------------------------
Index: icedtea6-1.7/openjdk/hotspot/src/share/vm/oops/typeArrayKlass.hpp
===================================================================
--- icedtea6-1.7.orig/openjdk/hotspot/src/share/vm/oops/typeArrayKlass.hpp
+++ icedtea6-1.7/openjdk/hotspot/src/share/vm/oops/typeArrayKlass.hpp
@@ -42,7 +42,7 @@ class typeArrayKlass : public arrayKlass
   static klassOop create_klass(BasicType type, int scale, const char* name_str,
                                TRAPS);
   static inline klassOop create_klass(BasicType type, int scale, TRAPS) {
-    return create_klass(type, scale, external_name(type), CHECK_NULL);
+    return create_klass(type, scale, external_name(type), THREAD); CHECK2_(NULL);
   }
 
   int oop_size(oop obj) const;
Index: icedtea6-1.7/openjdk/hotspot/src/share/vm/utilities/exceptions.hpp
===================================================================
--- icedtea6-1.7.orig/openjdk/hotspot/src/share/vm/utilities/exceptions.hpp
+++ icedtea6-1.7/openjdk/hotspot/src/share/vm/utilities/exceptions.hpp
@@ -178,6 +178,8 @@ class Exceptions {
 
 #define CHECK                                    THREAD); if (HAS_PENDING_EXCEPTION) return       ; (0
 #define CHECK_(result)                           THREAD); if (HAS_PENDING_EXCEPTION) return result; (0
+//MV: same as a CHECK_(result), but for usage outside of func call, so it not have no effect statement (0)
+#define CHECK2_(result)                          if (HAS_PENDING_EXCEPTION) return result
 #define CHECK_0                                  CHECK_(0)
 #define CHECK_NH                                 CHECK_(Handle())
 #define CHECK_NULL                               CHECK_(NULL)
openSUSE Build Service is sponsored by