From 7ab26044167c84fc6386cc179e8a8736d8978c91 Mon Sep 17 00:00:00 2001 From: Wade Walker Date: Fri, 7 Mar 2014 16:32:48 -0600 Subject: Remove Java lint warnings. Remove all Java lint warnings, by fixing the code if possible, and if not possible then by inserting @SuppressWarnings. Some of these @SuppressWarnings can be replaced later with @SafeVarargs if we eventually drop support for Java 6. --- test/com/jogamp/opencl/CLBufferTest.java | 3 +++ test/com/jogamp/opencl/CLCommandQueueTest.java | 1 + test/com/jogamp/opencl/HighLevelBindingTest.java | 2 ++ test/com/jogamp/opencl/gl/CLGLTest.java | 4 ++++ 4 files changed, 10 insertions(+) (limited to 'test') diff --git a/test/com/jogamp/opencl/CLBufferTest.java b/test/com/jogamp/opencl/CLBufferTest.java index 932266f6..635af4fc 100644 --- a/test/com/jogamp/opencl/CLBufferTest.java +++ b/test/com/jogamp/opencl/CLBufferTest.java @@ -263,6 +263,7 @@ public class CLBufferTest extends UITestCase { if(MiscUtils.isOpenCLUnavailable()) return; + @SuppressWarnings("unchecked") CLPlatform platform = CLPlatform.getDefault(version(CL_1_1)); if(platform == null) { out.println("aborting subBufferTest"); @@ -309,6 +310,7 @@ public class CLBufferTest extends UITestCase { if(MiscUtils.isOpenCLUnavailable()) return; + @SuppressWarnings("unchecked") CLPlatform platform = CLPlatform.getDefault(version(CL_1_1)); if(platform == null) { out.println("aborting subBufferTest"); @@ -359,6 +361,7 @@ public class CLBufferTest extends UITestCase { if(MiscUtils.isOpenCLUnavailable()) return; + @SuppressWarnings("unchecked") CLPlatform platform = CLPlatform.getDefault(version(CL_1_1)); if(platform == null) { out.println("aborting destructorCallbackTest"); diff --git a/test/com/jogamp/opencl/CLCommandQueueTest.java b/test/com/jogamp/opencl/CLCommandQueueTest.java index 491eab53..3fc17e85 100644 --- a/test/com/jogamp/opencl/CLCommandQueueTest.java +++ b/test/com/jogamp/opencl/CLCommandQueueTest.java @@ -170,6 +170,7 @@ public class CLCommandQueueTest extends UITestCase { } } + @SuppressWarnings("unchecked") @Test public void eventConditionsTest() throws IOException { diff --git a/test/com/jogamp/opencl/HighLevelBindingTest.java b/test/com/jogamp/opencl/HighLevelBindingTest.java index a0a67595..9fa9f921 100644 --- a/test/com/jogamp/opencl/HighLevelBindingTest.java +++ b/test/com/jogamp/opencl/HighLevelBindingTest.java @@ -212,7 +212,9 @@ public class HighLevelBindingTest extends UITestCase { if(MiscUtils.isOpenCLUnavailable()) return; + @SuppressWarnings("unchecked") CLPlatform platformGPU = CLPlatform.getDefault(version(CL_1_0), type(GPU)); + @SuppressWarnings("unchecked") CLPlatform platformCPU = CLPlatform.getDefault(version(CL_1_0), type(CPU)); if(platformGPU != null) { diff --git a/test/com/jogamp/opencl/gl/CLGLTest.java b/test/com/jogamp/opencl/gl/CLGLTest.java index 52f0e574..b5d85690 100644 --- a/test/com/jogamp/opencl/gl/CLGLTest.java +++ b/test/com/jogamp/opencl/gl/CLGLTest.java @@ -113,7 +113,9 @@ public class CLGLTest extends UITestCase { initGL(); + @SuppressWarnings("unchecked") CLPlatform platform = CLPlatform.getDefault(CLPlatformFilters.glSharing()); + @SuppressWarnings("unchecked") CLDevice device = platform.getMaxFlopsDevice(CLDeviceFilters.glSharing()); if(device == null) { @@ -159,12 +161,14 @@ public class CLGLTest extends UITestCase { makeGLCurrent(); assertTrue(glcontext.isCurrent()); + @SuppressWarnings("unchecked") CLPlatform platform = CLPlatform.getDefault(glSharing(glcontext)); if(platform == null) { out.println("test aborted"); return; } + @SuppressWarnings("unchecked") CLDevice theChosenOne = platform.getMaxFlopsDevice(CLDeviceFilters.glSharing()); out.println(theChosenOne); -- cgit v1.2.3