mirror of
https://github.com/linux-can/can-utils.git
synced 2026-09-22 08:06:34 +02:00
can-utils: fix sign-compare warnings (#513)
Fixing several build issues reported by Gary Bisson when he was building can-utils with clang (AOSP14). URL: https://github.com/linux-can/can-utils/pull/512 Reported-by: Gary Bisson (https://github.com/gibsson) Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
This commit is contained in:
@@ -268,10 +268,10 @@ static int isobusfs_cli_rx_one(struct isobusfs_priv *priv, int sock)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int isobusfs_cli_handle_events(struct isobusfs_priv *priv, int nfds)
|
||||
static int isobusfs_cli_handle_events(struct isobusfs_priv *priv, unsigned int nfds)
|
||||
{
|
||||
int ret;
|
||||
int n;
|
||||
unsigned int n;
|
||||
|
||||
for (n = 0; n < nfds && n < priv->cmn.epoll_events_size; ++n) {
|
||||
struct epoll_event *ev = &priv->cmn.epoll_events[n];
|
||||
@@ -341,7 +341,7 @@ int isobusfs_cli_process_events_and_tasks(struct isobusfs_priv *priv)
|
||||
return ret;
|
||||
|
||||
if (nfds > 0) {
|
||||
ret = isobusfs_cli_handle_events(priv, nfds);
|
||||
ret = isobusfs_cli_handle_events(priv, (unsigned int)nfds);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user