mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-22 01:49:11 +00:00
Add some casts to quiet -Wconversion
This commit is contained in:
parent
9613ef9445
commit
3d85f2e98f
@ -50,7 +50,7 @@ sudo_setgroups_v1(int ngids, const GETGROUPS_T *gids)
|
||||
if (maxgids == -1)
|
||||
maxgids = NGROUPS_MAX;
|
||||
if (ngids > maxgids)
|
||||
ret = setgroups(maxgids, (GETGROUPS_T *)gids);
|
||||
ret = setgroups((int)maxgids, (GETGROUPS_T *)gids);
|
||||
}
|
||||
debug_return_int(ret);
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ sudo_printf_int(int msg_type, const char * restrict fmt, ...)
|
||||
va_end(ap);
|
||||
}
|
||||
if (len != -1) {
|
||||
if (fwrite(buf, 1, len, ttyfp ? ttyfp : fp) == 0)
|
||||
if (fwrite(buf, 1, (size_t)len, ttyfp ? ttyfp : fp) == 0)
|
||||
len = -1;
|
||||
if (buf != sbuf)
|
||||
free(buf);
|
||||
|
@ -219,7 +219,7 @@ sudo_conversation_printf(int msg_type, const char * restrict fmt, ...)
|
||||
va_end(ap);
|
||||
}
|
||||
if (len != -1) {
|
||||
if (fwrite(buf, 1, len, ttyfp ? ttyfp : fp) == 0)
|
||||
if (fwrite(buf, 1, (size_t)len, ttyfp ? ttyfp : fp) == 0)
|
||||
len = -1;
|
||||
if (buf != sbuf)
|
||||
free(buf);
|
||||
|
Loading…
x
Reference in New Issue
Block a user