8081886: CGGlyphImages.m no longer builds with x code 4.x
authorprr
Wed, 03 Jun 2015 17:58:00 -0700
changeset 31167 4fe9ebd79f86
parent 31166 6448eff013a8
child 31168 3b8f5ca8938f
8081886: CGGlyphImages.m no longer builds with x code 4.x Reviewed-by: bae, serb
jdk/src/java.desktop/macosx/native/libawt_lwawt/font/CGGlyphImages.m
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/font/CGGlyphImages.m	Wed Jun 03 23:17:52 2015 +0300
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/font/CGGlyphImages.m	Wed Jun 03 17:58:00 2015 -0700
@@ -203,6 +203,7 @@
     if (reverseGamma == 0) {
         // initialize gamma lut
         double gamma;
+        int i;
         const char* pGammaEnv = getenv("J2D_LCD_REVERSE_GAMMA");
         if (pGammaEnv != NULL) {
             reverseGamma = atol(pGammaEnv);
@@ -213,7 +214,7 @@
         }
         
         gamma = 100.0 / reverseGamma;
-        for (int i = 0; i < 256; i++) {
+        for (i = 0; i < 256; i++) {
             double x = ((double)i) / 255.0;
             reverseGammaLut[i] = (UInt8)(255 * pow(x, gamma));
         }