8350623: Fix -Wzero-as-null-pointer-constant warnings in nsk native test utilities

Reviewed-by: coleenp
This commit is contained in:
Kim Barrett 2025-03-03 15:53:47 +00:00
parent 4a51c61b2c
commit 67dfdfa6ea
2 changed files with 7 additions and 3 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -98,7 +98,11 @@ void* procedure(void* t) {
thread->started = 1;
thread->status = thread->procedure(thread->context);
thread->finished = 1;
#ifdef windows
return 0;
#else // !windows
return nullptr;
#endif
}
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2004, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -109,7 +109,7 @@ int nsk_list_remove(const void *plist, int ind) {
list_info->arr[i - 1] = list_info->arr[i];
}
}
list_info->arr[--list_info->elements_count] = 0;
list_info->arr[--list_info->elements_count] = nullptr;
return NSK_TRUE;
}