-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-enabling narrowing errors #1144
Conversation
e41f811
to
f46c622
Compare
c16511e
to
25983c6
Compare
Any comments on here? |
25983c6
to
629fb20
Compare
@ahesham-arm This is failing the CI. It may require a rebase and/or fixes. |
08da74d
to
2b418b0
Compare
@kpet Rebased and all CI checks are now passing. |
test_conformance/extensions/cl_khr_command_buffer/command_buffer_printf.cpp
Outdated
Show resolved
Hide resolved
2b418b0
to
d5937ea
Compare
@@ -274,7 +274,7 @@ struct CommandBufferPrintfTest : public BasicCommandBufferTest | |||
&pattern[0], 0, nullptr, nullptr); | |||
test_error(error, "clEnqueueWriteBuffer failed"); | |||
|
|||
cl_int offset[] = { 0, pattern.size() - 1 }; | |||
size_t offset[] = { 0, pattern.size() - 1 }; | |||
error = clEnqueueWriteBuffer(queue, off_mem, CL_TRUE, 0, sizeof(offset), | |||
offset, 0, nullptr, nullptr); | |||
test_error(error, "clEnqueueWriteBuffer failed"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
off_mem is created for sizeof(cl_int) size so I think the enqueuewritebuffer to it using sizeof(size_t) can cause issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now using cl_uint
for the type of the array and an assert is added to ensure the casting is safe.
@@ -115,7 +115,8 @@ struct CreateCommandBufferRepeatedProperties : public BasicCommandBufferTest | |||
TEST_FAIL); | |||
|
|||
cl_command_buffer_properties_khr invalid_properties[3] = { | |||
CL_COMMAND_BUFFER_FLAGS_KHR, CL_INVALID_PROPERTY, 0 | |||
CL_COMMAND_BUFFER_FLAGS_KHR, | |||
(cl_command_buffer_properties_khr)CL_INVALID_PROPERTY, 0 | |||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure CL_INVALID_PROPERTY can be used in a property list like this. The spec only specifies its usage as a return value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have used -1
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments
Fixes narrowing conversion build errors in test_common Removing disable of narrowing errors in main CMakeLists.txt and moving it down to test_conformance CMakeLists.txt where there are many more build errors revealed from this fix Contributes KhronosGroup#787 Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
d5937ea
to
2c9e7d3
Compare
Moves -Wno-narrowing down to only run on suites with many narrowing errors. Includes some quick fixes for one-off errors this caused. Contributes KhronosGroup#787 Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
Includes fix for MacOS build error Contributes KhronosGroup#787 Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
Contributes KhronosGroup#787 Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
2c9e7d3
to
a27cdc3
Compare
Merging as discussed in the October 8th teleconference. |
Fixes narrowing conversion build errors in test_common
Removing disable of narrowing errors in main CMakeLists.txt
and moving it down to specific test_conformance suite's
CMakeLists.txt where there are many more build errors revealed
from this fix.
Fixes a few simple issues under test_conformance in the process.
Contributes #787
Signed-off-by: Ellen Norris-Thompson ellen.norris-thompson@arm.com