From e759595d51fee02abfed39102cff6dd8d31670f4 Mon Sep 17 00:00:00 2001 From: Phil Race Date: Wed, 3 Jun 2015 17:58:00 -0700 Subject: [PATCH] 8081886: CGGlyphImages.m no longer builds with x code 4.x Reviewed-by: bae, serb --- .../macosx/native/libawt_lwawt/font/CGGlyphImages.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jdk/src/java.desktop/macosx/native/libawt_lwawt/font/CGGlyphImages.m b/jdk/src/java.desktop/macosx/native/libawt_lwawt/font/CGGlyphImages.m index c1dd6eb59c8..994bda41982 100644 --- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/font/CGGlyphImages.m +++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/font/CGGlyphImages.m @@ -203,6 +203,7 @@ static inline UInt8* getReverseGammaLut() { 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 @@ static inline UInt8* getReverseGammaLut() { } 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)); }