Commit 9bad6ed8 authored by Alessandro Rubini's avatar Alessandro Rubini

tools: fix warnings

This fixes warnings that either come from a newer compiler than what I
routinely use or from building in a 64-bit host.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <>
parent 77f9b8fd
......@@ -74,7 +74,7 @@ int main(int argc, char **argv)
gettimeofday(&tv, NULL);
localtime_r(&tv.tv_sec, &tm);
strftime(s, sizeof(s), "%y-%m-%d-%H:%M:%S", &tm);
printf("%s: %10lli us\n", s, newdiff / 1000);
printf("%s: %10lli us\n", s, (long long)newdiff / 1000);
prevprint = newdiff;
fflush(stdout); /* for our outgoing pipe */
......@@ -29,13 +29,10 @@ static void run_passive_host(int argc, char **argv, int sock,
unsigned char *ourmac)
int i;
socklen_t slen;
struct sockaddr_ll addr;
struct timespec ts1[4], ts2[4];
struct eth_packet pkt;
/* get forward packet and stamp it */
slen = sizeof(addr);
i = recv_and_stamp(sock, &pkt, sizeof(pkt), MSG_TRUNC);
if (i < 0) {
fprintf(stderr, "%s: recvfrom(): %s\n", argv[0],
......@@ -162,7 +162,7 @@ static void __collect_data(struct msghdr *msgp)
if (0) {
unsigned char *data;
printf("level %i, type %i, len %i\n", cmsg->cmsg_level,
cmsg->cmsg_type, cmsg->cmsg_len);
cmsg->cmsg_type, (int)cmsg->cmsg_len);
data = CMSG_DATA(cmsg);
for (i = 0; i < cmsg->cmsg_len; i++)
printf (" %02x", data[i]);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment