OpenCL-CTS icon indicating copy to clipboard operation
OpenCL-CTS copied to clipboard

CTS: Fix compile warnings.

Open lakshmih opened this issue 4 years ago • 1 comments

For 32 and 64-bit Visual Studio and the Android Q NDK.

General:

  • Improve variable types.
  • Make casts explicit to improve readability.
  • Improve printf format specifiers, favoe hex values.
  • Don't warn about using the portable "strdup" on Visual Studio.
  • Limit the mark pragma to Apple environments since it's only useful in XCode and causes a warning otherwise.
  • Move GLES3 macro from CMakeLists.txt to test_conformance/gles/CMakeLists.txt to be more specific.
  • Remove unused variables.
  • Fix type narrowing caused by assigning size_ts to ints. This also better matches the types of clEnqueueNDRangeKernel's local size, global size, and global offset.

test_common/gles/helpers.cpp:

  • Remove needless realWidth and realHeight variables.

test_common/harness/compat.h:

  • Don't redefine EXTERN_C on Windows where it's already in the OS headers.

test_common/harness/conversions.cpp:

  • Fix warning about storing -1 into unsigned long upper limits.

test_common/harness/errorHelpers.h:

  • Remove the custom compile time assert in favor of the standard "static_assert".

test_common/harness/imageHelpers.cpp:

  • Use the standard "static_assert" as supported by Visual Studio 2015 instead of the custom "ct_assert".

test_conformance/subgroups: Fix most compile warnings.

lakshmih avatar Oct 09 '21 21:10 lakshmih

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


oramirez seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Oct 07 '25 13:10 CLAassistant