Commit d43d3419 authored by Federico Vaga's avatar Federico Vaga

tools: fix data types

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 728fa03a
...@@ -145,7 +145,7 @@ static void *spec_map_area(int bus, int dev, int bar, size_t size) ...@@ -145,7 +145,7 @@ static void *spec_map_area(int bus, int dev, int bar, size_t size)
MAP_SHARED, fd, 0); MAP_SHARED, fd, 0);
close(fd); close(fd);
if((int)ptr == -1) if((long)ptr == -1)
return NULL; return NULL;
return ptr; return ptr;
......
...@@ -168,7 +168,7 @@ static void __collect_data(struct msghdr *msgp, struct ts_data *tstamp) ...@@ -168,7 +168,7 @@ static void __collect_data(struct msghdr *msgp, struct ts_data *tstamp)
for (cm = CMSG_FIRSTHDR(msgp); cm; cm = CMSG_NXTHDR(msgp, cm)) { for (cm = CMSG_FIRSTHDR(msgp); cm; cm = CMSG_NXTHDR(msgp, cm)) {
tsptr = (struct timespec *)CMSG_DATA(cm); tsptr = (struct timespec *)CMSG_DATA(cm);
if (0) { if (0) {
printf("level %i, type %i, len %i\n", cm->cmsg_level, printf("level %i, type %i, len %li\n", cm->cmsg_level,
cm->cmsg_type, cm->cmsg_len); cm->cmsg_type, cm->cmsg_len);
} }
if (cm->cmsg_level != SOL_SOCKET) if (cm->cmsg_level != SOL_SOCKET)
......
...@@ -116,7 +116,7 @@ int main(int argc, char **argv) ...@@ -116,7 +116,7 @@ int main(int argc, char **argv)
len = recv(agent_sock, &f, sizeof(f), MSG_TRUNC); len = recv(agent_sock, &f, sizeof(f), MSG_TRUNC);
if (len != sizeof(f)) { if (len != sizeof(f)) {
fprintf(stderr, "%s: recevied unexpected frame length" fprintf(stderr, "%s: recevied unexpected frame length"
" (%i instead of %i)\n", agent_prgname, len, " (%i instead of %lu)\n", agent_prgname, len,
sizeof(f)); sizeof(f));
continue; continue;
} }
......
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