mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-15 15:06:42 +00:00
Fix signed/unsigned comparison warning/error from 'make release'
This commit is contained in:
parent
66ff0e67c4
commit
9015b953d6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=109960
@ -638,7 +638,7 @@ _fetch_netrc_auth(struct url *url)
|
||||
FILE *f;
|
||||
|
||||
if ((p = getenv("NETRC")) != NULL) {
|
||||
if (snprintf(fn, sizeof fn, "%s", p) >= sizeof fn) {
|
||||
if (snprintf(fn, sizeof fn, "%s", p) >= (int)sizeof(fn)) {
|
||||
_fetch_info("$NETRC specifies a file name "
|
||||
"longer than PATH_MAX");
|
||||
return (-1);
|
||||
@ -651,7 +651,7 @@ _fetch_netrc_auth(struct url *url)
|
||||
(p = pwd->pw_dir) == NULL)
|
||||
return (-1);
|
||||
}
|
||||
if (snprintf(fn, sizeof fn, "%s/.netrc", p) >= sizeof fn)
|
||||
if (snprintf(fn, sizeof fn, "%s/.netrc", p) >= (int)sizeof(fn))
|
||||
return (-1);
|
||||
}
|
||||
|
||||
@ -676,7 +676,7 @@ _fetch_netrc_auth(struct url *url)
|
||||
if ((word = _fetch_read_word(f)) == NULL)
|
||||
goto ferr;
|
||||
if (snprintf(url->user, sizeof url->user,
|
||||
"%s", word) > sizeof url->user) {
|
||||
"%s", word) > (int)sizeof(url->user)) {
|
||||
_fetch_info("login name in .netrc is too long");
|
||||
url->user[0] = '\0';
|
||||
}
|
||||
@ -684,7 +684,7 @@ _fetch_netrc_auth(struct url *url)
|
||||
if ((word = _fetch_read_word(f)) == NULL)
|
||||
goto ferr;
|
||||
if (snprintf(url->pwd, sizeof url->pwd,
|
||||
"%s", word) > sizeof url->pwd) {
|
||||
"%s", word) > (int)sizeof(url->pwd)) {
|
||||
_fetch_info("password in .netrc is too long");
|
||||
url->pwd[0] = '\0';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user