mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
Fix -Wshorten-64-to-32 on FreeBSD
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This commit is contained in:
parent
bca18298a1
commit
9ed6aa0be1
@ -153,7 +153,7 @@ restart:
|
||||
|
||||
/* Restore old terminal settings and signals. */
|
||||
if (memcmp(&term, &oterm, sizeof(term)) != 0) {
|
||||
const int sigttou = signo[SIGTTOU];
|
||||
const int sigttou = (int)signo[SIGTTOU];
|
||||
|
||||
/* Ignore SIGTTOU generated when we are not the fg pgrp. */
|
||||
while (tcsetattr(input, TCSAFLUSH|TCSASOFT, &oterm) == -1 &&
|
||||
|
@ -44,7 +44,7 @@ private:
|
||||
int fd;
|
||||
#endif
|
||||
#if defined(OS_FREEBSD)
|
||||
int pagesize;
|
||||
size_t pagesize;
|
||||
pid_t self;
|
||||
#endif
|
||||
};
|
||||
|
@ -124,12 +124,12 @@ int io_submit(int ctx, long nr, struct iocb * iocbpp[])
|
||||
}
|
||||
}
|
||||
|
||||
return nr;
|
||||
return static_cast<int>(nr);
|
||||
}
|
||||
|
||||
int io_getevents(int ctx, long, long max_nr, struct kevent * events, struct timespec * timeout)
|
||||
{
|
||||
return kevent(ctx, nullptr, 0, events, max_nr, timeout);
|
||||
return kevent(ctx, nullptr, 0, events, static_cast<int>(max_nr), timeout);
|
||||
}
|
||||
|
||||
|
||||
|
@ -203,7 +203,7 @@ void ClientInfo::setInitialQuery()
|
||||
void ClientInfo::fillOSUserHostNameAndVersionInfo()
|
||||
{
|
||||
os_user.resize(256, '\0');
|
||||
if (0 == getlogin_r(os_user.data(), os_user.size() - 1))
|
||||
if (0 == getlogin_r(os_user.data(), static_cast<int>(os_user.size() - 1)))
|
||||
os_user.resize(strlen(os_user.c_str()));
|
||||
else
|
||||
os_user.clear(); /// Don't mind if we cannot determine user login.
|
||||
|
Loading…
Reference in New Issue
Block a user