fix -Wsign-compare issues
This commit is contained in:
parent
c7201a0f39
commit
f092a45e5d
2
external/bsd/atf/dist/atf-c/dynstr.c
vendored
2
external/bsd/atf/dist/atf-c/dynstr.c
vendored
@ -162,7 +162,7 @@ atf_dynstr_init_ap(atf_dynstr_t *ad, const char *fmt, va_list ap)
|
||||
if (ret < 0) {
|
||||
err = atf_libc_error(errno, "Cannot format string");
|
||||
} else {
|
||||
if (ret >= ad->m_datasize) {
|
||||
if ((size_t)ret >= ad->m_datasize) {
|
||||
free(ad->m_data);
|
||||
ad->m_data = NULL;
|
||||
}
|
||||
|
4
external/bsd/atf/dist/atf-c/fs.c
vendored
4
external/bsd/atf/dist/atf-c/fs.c
vendored
@ -423,7 +423,7 @@ atf_fs_path_branch_path(const atf_fs_path_t *p, atf_fs_path_t *bp)
|
||||
const ssize_t endpos = atf_dynstr_rfind_ch(&p->m_data, '/');
|
||||
atf_error_t err;
|
||||
|
||||
if (endpos == atf_dynstr_npos)
|
||||
if ((size_t)endpos == atf_dynstr_npos)
|
||||
err = atf_fs_path_init_fmt(bp, ".");
|
||||
else if (endpos == 0)
|
||||
err = atf_fs_path_init_fmt(bp, "/");
|
||||
@ -452,7 +452,7 @@ atf_fs_path_leaf_name(const atf_fs_path_t *p, atf_dynstr_t *ln)
|
||||
ssize_t begpos = atf_dynstr_rfind_ch(&p->m_data, '/');
|
||||
atf_error_t err;
|
||||
|
||||
if (begpos == atf_dynstr_npos)
|
||||
if ((size_t)begpos == atf_dynstr_npos)
|
||||
begpos = 0;
|
||||
else
|
||||
begpos++;
|
||||
|
2
external/bsd/atf/dist/atf-c/io.c
vendored
2
external/bsd/atf/dist/atf-c/io.c
vendored
@ -80,7 +80,7 @@ atf_io_write_ap(int fd, const char *fmt, va_list ap)
|
||||
"descriptor %d", atf_dynstr_cstring(&str),
|
||||
fd);
|
||||
else {
|
||||
INV(cnt == atf_dynstr_length(&str));
|
||||
INV((size_t)cnt == atf_dynstr_length(&str));
|
||||
err = atf_no_error();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user