summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaniel <danieruru@gmail.com>2013-01-13 13:59:50 +0900
committerdaniel <danieruru@gmail.com>2013-01-13 13:59:50 +0900
commitfcdf4a1a5f904570c0398804fd484f1024c84954 (patch)
treeeffc9deed1050355f1c31f63a2df53d40d5cb898
parentbc916934671e2361798b6d544d595063f4708810 (diff)
clean up compiler warnings in the server
-rw-r--r--vxi11_server.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/vxi11_server.c b/vxi11_server.c
index 118f1a7..0f2c91d 100644
--- a/vxi11_server.c
+++ b/vxi11_server.c
@@ -3,6 +3,7 @@
#include "globals.h"
#include "gpib.h"
#include "parser.h"
+#include <unistd.h>
#include <stdio.h>
#include <rpc/rpc.h>
#include <stdbool.h>
@@ -12,6 +13,7 @@
#define DEBUG
#ifdef DEBUG
+#include <arpa/inet.h>
#include <stdlib.h>
#endif
@@ -157,7 +159,7 @@ device_write_1_svc(Device_WriteParms *argp, struct svc_req *rqstp) {
}
else {
#ifdef DEBUG
- printf("got %s on link %d\n", argp->data.data_val, argp->lid);
+ printf("got %s on link %d\n", argp->data.data_val, (int) argp->lid);
#endif
Parser_main(argp->data.data_val, 0, GPIB_and_VXI_start_query_response, NULL);
result.size = argp->data.data_len;
@@ -408,7 +410,8 @@ create_intr_chan_1_svc(Device_RemoteFunc *argp, struct svc_req *rqstp) {
printf("create_intr_chan_1_svc()\n");
char clientaddressstring[INET_ADDRSTRLEN];
inet_ntop(AF_INET, &argp->hostAddr, clientaddressstring, sizeof(clientaddressstring));
- printf("Client %s is asking for an interrupt connection on port %u\n", clientaddressstring, argp->hostPort);
+ printf("Client %s is asking for an interrupt connection on port %u\n", clientaddressstring,
+ (unsigned int) argp->hostPort);
#endif
if (argp->progFamily != DEVICE_TCP || argp->progNum != DEVICE_INTR || argp->progVers != DEVICE_INTR_VERSION)
result.error = ERR_OPERATIONNOTSUPPORTED;