File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -326,11 +326,11 @@ void khrIcdLayerAdd(const char *libraryName)
326326
327327 for (cl_uint i = 0 ; i < limit ; i ++ ) {
328328 ((void * * )& (layer -> dispatch ))[i ] =
329- ((void * * )layerDispatch )[i ] ?
330- ((void * * )layerDispatch )[i ] : ((void * * )targetDispatch )[i ];
329+ ((void * const * )layerDispatch )[i ] ?
330+ ((void * const * )layerDispatch )[i ] : ((void * const * )targetDispatch )[i ];
331331 }
332332 for (cl_uint i = limit ; i < loaderDispatchNumEntries ; i ++ ) {
333- ((void * * )& (layer -> dispatch ))[i ] = ((void * * )targetDispatch )[i ];
333+ ((void * * )& (layer -> dispatch ))[i ] = ((void * const * )targetDispatch )[i ];
334334 }
335335
336336 KHR_ICD_TRACE ("successfully added layer %s\n" , libraryName );
Original file line number Diff line number Diff line change @@ -36,12 +36,12 @@ clGetICDLoaderInfoOCLICD(
3636 static const char cl_icdl_NAME [] = OPENCL_ICD_LOADER_NAME_STRING ;
3737 static const char cl_icdl_VENDOR [] = OPENCL_ICD_LOADER_VENDOR_STRING ;
3838 size_t pvs ;
39- void * pv ;
39+ const void * pv = NULL ;
4040
4141#define KHR_ICD_CASE_STRING_PARAM_NAME (name ) \
4242 case CL_ICDL_ ## name: \
4343 pvs = strlen(cl_icdl_ ## name) + 1; \
44- pv = (void *)cl_icdl_ ## name; \
44+ pv = (const void *)cl_icdl_ ## name; \
4545 break
4646
4747 switch (param_name ) {
Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ struct dirElem
129129static int compareDirElem (const void * a , const void * b )
130130{
131131 // sort files the same way libc alpahnumerically sorts directory entries.
132- return strcoll (((struct dirElem * )a )-> d_name , ((struct dirElem * )b )-> d_name );
132+ return strcoll (((const struct dirElem * )a )-> d_name , ((const struct dirElem * )b )-> d_name );
133133}
134134
135135static inline void khrIcdOsDirEnumerate (const char * path , const char * env ,
You can’t perform that action at this time.
0 commit comments