From 53a3bbf43f4e4caf6cfee6286eb21e91f01a1068 Mon Sep 17 00:00:00 2001 From: Graham Date: Thu, 8 Aug 2019 22:53:22 +0100 Subject: [PATCH] Enable and fix MSVC warnings --- gl-natives/src/main/c/jaggl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gl-natives/src/main/c/jaggl.c b/gl-natives/src/main/c/jaggl.c index bd66976..69c195a 100644 --- a/gl-natives/src/main/c/jaggl.c +++ b/gl-natives/src/main/c/jaggl.c @@ -49,6 +49,7 @@ obj ## _carray = (*env)->GetPrimitiveArrayCritical(env, obj, NULL); \ obj ## _ptr = (void *) ((uintptr_t) obj ## _carray + (size_t) obj_off); \ } else { \ + obj ## _carray = NULL; \ obj ## _ptr = NULL; \ } @@ -655,7 +656,6 @@ JNIEXPORT jboolean JNICALL Java_jaggl_context_choosePixelFormat1(JNIEnv *env, jc attribs[j++] = num_samples; } - int format; UINT num_formats; if (!jaggl_wglChoosePixelFormatARB(jaggl_device, attribs, NULL, 1, &format, &num_formats)) { continue; @@ -686,7 +686,7 @@ JNIEXPORT jboolean JNICALL Java_jaggl_context_choosePixelFormat1(JNIEnv *env, jc .cRedBits = 8, .cGreenBits = 8, .cBlueBits = 8, - .cAlphaBits = alpha_bits, + .cAlphaBits = (BYTE) alpha_bits, .cDepthBits = 24, .iLayerType = PFD_MAIN_PLANE };