@@ -356,7 +356,6 @@ static hid_t
356356H5FD_gds_init (void )
357357{
358358 CUfileError_t status ;
359- CUfileDescr_t cf_descr ;
360359 char * lock_env_var = NULL ; /* Environment variable pointer */
361360 hid_t ret_value = H5I_INVALID_HID ; /* Return value */
362361
@@ -416,10 +415,11 @@ H5FD_gds_init(void)
416415static herr_t
417416H5FD__gds_term (void )
418417{
419- CUfileError_t status ;
420- herr_t ret_value = SUCCEED ; /* Return value */
418+ herr_t ret_value = SUCCEED ; /* Return value */
421419
422420 if (cu_file_driver_opened ) {
421+ /* CUfileError_t status; */
422+
423423 /* FIXME: cuFileDriveClose is throwing errors with h5py and cupy */
424424 /*
425425 * status = cuFileDriverClose();
@@ -604,7 +604,6 @@ H5FD__gds_fapl_get(H5FD_t *_file)
604604 /* Set return value */
605605 ret_value = H5FD__gds_fapl_copy (& (file -> fa ));
606606
607- done :
608607 H5FD_GDS_FUNC_LEAVE_API ;
609608} /* end H5FD__gds_fapl_get() */
610609
@@ -986,6 +985,9 @@ H5FD__gds_query(const H5FD_t *_f, unsigned long *flags /* out */)
986985{
987986 herr_t ret_value = SUCCEED ;
988987
988+ /* Silence compiler */
989+ (void )_f ;
990+
989991 /* Set the VFL feature flags that this driver supports */
990992 if (flags ) {
991993 * flags = 0 ;
@@ -1023,6 +1025,9 @@ H5FD__gds_get_eoa(const H5FD_t *_file, H5FD_mem_t type)
10231025
10241026 assert (file );
10251027
1028+ /* Silence compiler */
1029+ (void )type ;
1030+
10261031 ret_value = file -> eoa ;
10271032
10281033 H5FD_GDS_FUNC_LEAVE_API ;
@@ -1047,6 +1052,9 @@ H5FD__gds_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr)
10471052 H5FD_gds_t * file = (H5FD_gds_t * )_file ;
10481053 herr_t ret_value = SUCCEED ;
10491054
1055+ /* Silence compiler */
1056+ (void )type ;
1057+
10501058 file -> eoa = addr ;
10511059
10521060 H5FD_GDS_FUNC_LEAVE_API ;
@@ -1075,6 +1083,9 @@ H5FD__gds_get_eof(const H5FD_t *_file, H5FD_mem_t type)
10751083
10761084 assert (file );
10771085
1086+ /* Silence compiler */
1087+ (void )type ;
1088+
10781089 ret_value = file -> eof ;
10791090
10801091 H5FD_GDS_FUNC_LEAVE_API ;
@@ -1095,6 +1106,9 @@ H5FD__gds_get_handle(H5FD_t *_file, hid_t fapl, void **file_handle)
10951106 H5FD_gds_t * file = (H5FD_gds_t * )_file ;
10961107 herr_t ret_value = SUCCEED ;
10971108
1109+ /* Silence compiler */
1110+ (void )fapl ;
1111+
10981112 if (!file_handle )
10991113 H5FD_GDS_GOTO_ERROR (H5E_ARGS , H5E_BADVALUE , FAIL , "file handle not valid" );
11001114 * file_handle = & (file -> fd );
@@ -1151,7 +1165,6 @@ H5FD__gds_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
11511165 size_t copy_size = size ; /* Size remaining to read when using copy buffer */
11521166 size_t copy_offset ; /* Offset into copy buffer of the requested data */
11531167
1154- CUfileError_t status ;
11551168 ssize_t ret = -1 ;
11561169 int io_threads = file -> num_io_threads ;
11571170 int block_size = file -> io_block_size ;
@@ -1163,13 +1176,19 @@ H5FD__gds_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
11631176 assert (file && file -> pub .cls );
11641177 assert (buf );
11651178
1179+ /* Silence compiler */
1180+ (void )type ;
1181+ (void )dxpl_id ;
1182+
11661183 /* Check for overflow conditions */
11671184 if (HADDR_UNDEF == addr )
11681185 H5FD_GDS_GOTO_ERROR (H5E_ARGS , H5E_BADVALUE , FAIL , "addr undefined" );
11691186 if (REGION_OVERFLOW (addr , size ))
11701187 H5FD_GDS_GOTO_ERROR (H5E_ARGS , H5E_OVERFLOW , FAIL , "addr overflow" );
11711188
11721189 if (is_device_pointer (buf )) {
1190+ /* CUfileError_t status; */
1191+
11731192 /* TODO: register device memory only once */
11741193 /*
11751194 * if (!reg_once) {
@@ -1418,7 +1437,6 @@ H5FD__gds_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
14181437 size_t copy_size = size ; /* Size remaining to write when using copy buffer */
14191438 size_t copy_offset ; /* Offset into copy buffer of the data to write */
14201439
1421- CUfileError_t status ;
14221440 ssize_t ret = -1 ;
14231441 int io_threads = file -> num_io_threads ;
14241442 int block_size = file -> io_block_size ;
@@ -1431,13 +1449,19 @@ H5FD__gds_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
14311449 assert (file && file -> pub .cls );
14321450 assert (buf );
14331451
1452+ /* Silence compiler */
1453+ (void )type ;
1454+ (void )dxpl_id ;
1455+
14341456 /* Check for overflow conditions */
14351457 if (HADDR_UNDEF == addr )
14361458 H5FD_GDS_GOTO_ERROR (H5E_ARGS , H5E_BADVALUE , FAIL , "addr undefined" );
14371459 if (REGION_OVERFLOW (addr , size ))
14381460 H5FD_GDS_GOTO_ERROR (H5E_ARGS , H5E_OVERFLOW , FAIL , "addr overflow" );
14391461
14401462 if (is_device_pointer (buf )) {
1463+ /* CUfileError_t status; */
1464+
14411465 /* TODO: register device memory only once */
14421466 /*
14431467 * if (!reg_once) {
@@ -1715,6 +1739,11 @@ H5FD__gds_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
17151739 herr_t ret_value = SUCCEED ; /* Return value */
17161740
17171741 assert (file );
1742+
1743+ /* Silence compiler */
1744+ (void )dxpl_id ;
1745+ (void )closing ;
1746+
17181747 if (fsync (file -> fd ) < 0 ) {
17191748 H5FD_GDS_SYS_GOTO_ERROR (H5E_VFL , H5E_CANTFLUSH , FAIL , "unable perform fsync on file descriptor" );
17201749 }
@@ -1743,6 +1772,10 @@ H5FD__gds_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
17431772
17441773 assert (file );
17451774
1775+ /* Silence compiler */
1776+ (void )dxpl_id ;
1777+ (void )closing ;
1778+
17461779 /* Extend the file to make sure it's large enough */
17471780 if (file -> eoa != file -> eof ) {
17481781#ifdef H5_HAVE_WIN32_API
@@ -1876,6 +1909,9 @@ H5FD__gds_delete(const char *filename, hid_t fapl_id)
18761909
18771910 assert (filename );
18781911
1912+ /* Silence compiler */
1913+ (void )fapl_id ;
1914+
18791915 if (remove (filename ) < 0 )
18801916 H5FD_GDS_SYS_GOTO_ERROR (H5E_VFL , H5E_CANTDELETEFILE , FAIL , "unable to delete file" );
18811917
@@ -1901,11 +1937,15 @@ H5FD__gds_ctl(H5FD_t *_file, uint64_t op_code, uint64_t flags, const void *input
19011937
19021938 assert (file );
19031939
1940+ /* Silence compiler */
1941+ (void )file ;
1942+ (void )output ;
1943+
19041944 switch (op_code ) {
19051945 /* Driver-level memory copy */
19061946 case H5FD_CTL__MEM_COPY :
19071947 {
1908- H5FD_ctl_memcpy_args_t * copy_args = (H5FD_ctl_memcpy_args_t * )input ;
1948+ const H5FD_ctl_memcpy_args_t * copy_args = (const H5FD_ctl_memcpy_args_t * )input ;
19091949 enum cudaMemcpyKind cpyKind ;
19101950 hbool_t src_on_device = FALSE;
19111951 hbool_t dst_on_device = FALSE;
0 commit comments