Skip to content

Commit 025bc92

Browse files
Merge pull request #44 from psychocoderHPC/fix-warningIgnoredReturnType
fix warning `unused return value`
2 parents c3348b7 + 379bfff commit 025bc92

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cuda_memtest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,18 +153,18 @@ thread_func(void* _arg)
153153
}
154154

155155
unsigned int tot_num_blocks_old = tot_num_blocks;
156-
apiError_t err;
157156

158157
// Try to allocate tot_num_blocks memory, if this fails we reduce the number of blocks
159158
// until we find a valid number of blocks which can be allocated.
160159
do{
161160
// reset error
162-
MEMTEST_API_PREFIX(GetLastError());
161+
CUERR(MEMTEST_API_PREFIX(GetLastError()));
163162
DEBUG_PRINTF("Trying to allocate %d MB\n", tot_num_blocks);
164163
if (tot_num_blocks <= 0){
165164
FPRINTF("ERROR: cannot allocate any memory from GPU\n");
166165
exit(ERR_GENERAL);
167166
}
167+
apiError_t err;
168168
if(useMappedMemory)
169169
{
170170
//create cuda mapped memory

0 commit comments

Comments
 (0)