mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-26 08:49:02 +00:00
Fix warnings in basic suite (#782)
* Fix "ignored typedef" warning * Fix "returning reference to temporary" warning
This commit is contained in:
@@ -37,6 +37,7 @@
|
|||||||
// TODO: pointer-to-half (and its vectors)
|
// TODO: pointer-to-half (and its vectors)
|
||||||
// TODO: union of...
|
// TODO: union of...
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
@@ -595,11 +596,11 @@ static int l_build_type_table(cl_device_id device)
|
|||||||
|
|
||||||
static const TypeInfo& l_find_type( const char* name )
|
static const TypeInfo& l_find_type( const char* name )
|
||||||
{
|
{
|
||||||
for ( size_t i = 0; i < num_type_info ; i++ ) {
|
auto itr =
|
||||||
if ( 0 == strcmp( name, type_info[i].get_name_c_str() ) ) return type_info[i];
|
std::find_if(type_info, type_info + num_type_info,
|
||||||
}
|
[name](TypeInfo& ti) { return ti.get_name() == name; });
|
||||||
assert(0);
|
assert(itr != type_info + num_type_info);
|
||||||
return TypeInfo();
|
return *itr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
#include "harness/conversions.h"
|
#include "harness/conversions.h"
|
||||||
#include "harness/typeWrappers.h"
|
#include "harness/typeWrappers.h"
|
||||||
|
|
||||||
typedef struct work_item_data
|
struct work_item_data
|
||||||
{
|
{
|
||||||
cl_uint workDim;
|
cl_uint workDim;
|
||||||
cl_uint globalSize[ 3 ];
|
cl_uint globalSize[ 3 ];
|
||||||
|
|||||||
Reference in New Issue
Block a user