Enable and fix MSVC warnings

pull/48/head
Graham 5 years ago
parent 4e5217db0c
commit a5c9851031
  1. 4
      gl-natives/src/main/c/jaggl.c
  2. 29
      pom.xml

@ -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
};

@ -320,6 +320,35 @@
<modules>
<module>misc-natives</module>
</modules>
<build>
<plugins>
<plugin>
<groupId>com.github.maven-nar</groupId>
<artifactId>nar-maven-plugin</artifactId>
<configuration>
<c>
<options>
<option>/Wall</option>
<!-- unused parameter -->
<option>/wd4100</option>
<!-- non-standard extension: nameless struct/union (in jawt_md.h) -->
<option>/wd4201</option>
<!-- non-standard extension: non-constant aggregate initializer -->
<option>/wd4204</option>
<!-- no function prototype given (in winuser.h) -->
<option>/wd4255</option>
<!-- undefined processor macro (in vcruntime.h and winioctl.h) -->
<option>/wd4668</option>
<!-- padding after data member (in jawt.h and jni.h) -->
<option>/wd4820</option>
<!-- compiler will insert Spectre mitigation -->
<option>/wd5045</option>
</options>
</c>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

Loading…
Cancel
Save