forked from OSchip/llvm-project
[libc] Minor test signedness fixes
Resolve compiler warnings about signed conversion Differential Revision: https://reviews.llvm.org/D124468
This commit is contained in:
parent
0ffcec418e
commit
de94cf5286
|
@ -41,7 +41,7 @@ static mtx_t broadcast_mtx, threads_ready_mtx;
|
||||||
|
|
||||||
int broadcast_thread_func(void *) {
|
int broadcast_thread_func(void *) {
|
||||||
__llvm_libc::mtx_lock(&broadcast_mtx);
|
__llvm_libc::mtx_lock(&broadcast_mtx);
|
||||||
int oldval = broadcast_count.fetch_add(1);
|
unsigned oldval = broadcast_count.fetch_add(1);
|
||||||
if (oldval == THRD_COUNT - 1) {
|
if (oldval == THRD_COUNT - 1) {
|
||||||
__llvm_libc::mtx_lock(&threads_ready_mtx);
|
__llvm_libc::mtx_lock(&threads_ready_mtx);
|
||||||
__llvm_libc::cnd_signal(&threads_ready_cnd);
|
__llvm_libc::cnd_signal(&threads_ready_cnd);
|
||||||
|
|
|
@ -24,7 +24,7 @@ struct ProcessStatus {
|
||||||
int platform_defined;
|
int platform_defined;
|
||||||
const char *failure = nullptr;
|
const char *failure = nullptr;
|
||||||
|
|
||||||
static constexpr uintptr_t TIMEOUT = -1L;
|
static constexpr unsigned TIMEOUT = ~0U;
|
||||||
|
|
||||||
static ProcessStatus error(const char *error) { return {0, error}; }
|
static ProcessStatus error(const char *error) { return {0, error}; }
|
||||||
static ProcessStatus timed_out_ps() {
|
static ProcessStatus timed_out_ps() {
|
||||||
|
@ -41,7 +41,7 @@ struct ProcessStatus {
|
||||||
};
|
};
|
||||||
|
|
||||||
ProcessStatus invoke_in_subprocess(FunctionCaller *func,
|
ProcessStatus invoke_in_subprocess(FunctionCaller *func,
|
||||||
unsigned timeout_ms = -1);
|
unsigned timeout_ms = TIMEOUT);
|
||||||
|
|
||||||
const char *signal_as_string(int signum);
|
const char *signal_as_string(int signum);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue