From a5c9851031ae0789c345ba763acc7a76e49a626d 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 ++-- pom.xml | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/gl-natives/src/main/c/jaggl.c b/gl-natives/src/main/c/jaggl.c index bd669765..69c195a3 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 }; diff --git a/pom.xml b/pom.xml index 8c560c92..712167c4 100644 --- a/pom.xml +++ b/pom.xml @@ -320,6 +320,35 @@ misc-natives + + + + com.github.maven-nar + nar-maven-plugin + + + + + + + + + + + + + + + + + + + + + + + +