PUD: fix compile warnings
authorFerry Huberts <ferry.huberts@pelagic.nl>
Fri, 8 Jun 2012 14:26:35 +0000 (16:26 +0200)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Fri, 8 Jun 2012 14:26:35 +0000 (16:26 +0200)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/pud/src/configuration.c
lib/pud/src/networkInterfaces.c

index 08426eb..0dc6f48 100644 (file)
@@ -346,7 +346,7 @@ int addRxNonOlsrInterface(const char *value, void *data __attribute__ ((unused))
        if (valueLength > IFNAMSIZ) {
                pudError(false, "Value of parameter %s (%s) is too long,"
                        " maximum length is %u, current length is %lu",
-                               PUD_RX_NON_OLSR_IF_NAME, value, IFNAMSIZ, valueLength);
+                               PUD_RX_NON_OLSR_IF_NAME, value, IFNAMSIZ, (long unsigned int)valueLength);
                return true;
        }
 
@@ -604,7 +604,7 @@ int addTxNonOlsrInterface(const char *value, void *data __attribute__ ((unused))
        valueLength = strlen(value);
        if (valueLength > IFNAMSIZ) {
                pudError(false, "Value of parameter %s (%s) is too long, maximum length is %u, current length is %lu",
-                               PUD_TX_NON_OLSR_IF_NAME, value, IFNAMSIZ, valueLength);
+                               PUD_TX_NON_OLSR_IF_NAME, value, IFNAMSIZ, (long unsigned int)valueLength);
                return true;
        }
 
index 0170e77..c89e865 100644 (file)
@@ -311,7 +311,7 @@ static int createTxSocket(TRxTxNetworkInterface * networkInterface) {
        int ipMcLoopSetting;
        int ipMcIfSetting;
        int ipTtlSetting;
-       unsigned int index;
+       unsigned int ifIndex;
 
        union olsr_sockaddr address;
        void * addr;
@@ -335,7 +335,7 @@ static int createTxSocket(TRxTxNetworkInterface * networkInterface) {
                ipMcLoopSetting = IP_MULTICAST_LOOP;
                ipMcIfSetting = IP_MULTICAST_IF;
                ipTtlSetting = IP_MULTICAST_TTL;
-               index = 0;
+               ifIndex = 0;
 
                address.in4.sin_family = ipFamilySetting;
                address.in4.sin_addr = networkInterface->ipAddress.in4.sin_addr;
@@ -350,10 +350,10 @@ static int createTxSocket(TRxTxNetworkInterface * networkInterface) {
                ipMcLoopSetting = IPV6_MULTICAST_LOOP;
                ipMcIfSetting = IPV6_MULTICAST_IF;
                ipTtlSetting = IPV6_MULTICAST_HOPS;
-               index = if_nametoindex((char *)networkInterface->name);
+               ifIndex = if_nametoindex((char *)networkInterface->name);
 
-               addr = &index;
-               addrSize = sizeof(index);
+               addr = &ifIndex;
+               addrSize = sizeof(ifIndex);
        }
 
        /*  Create a datagram socket on which to transmit */