[hipl-commit] [trunk] Rev 4589: Fixed compilation warnings from hipd/netdev.c

  • From: Miika Komu <miika@xxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Tue, 25 May 2010 13:26:49 +0300

Committer: Miika Komu <miika@xxxxxx>
Date: 25/05/2010 at 13:26:48
Revision: 4589
Revision-id: miika@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: trunk

Log:
  Fixed compilation warnings from hipd/netdev.c
  
   xx (there were encoding issues in this line) xx
  hipd/netdev.c:997: warning: cast discards qualifiers from pointer target type
   xx (there were encoding issues in this line) xx
  hipd/netdev.c:1172: warning: cast discards qualifiers from pointer target type
  hipd/netdev.c:1174: warning: cast discards qualifiers from pointer target type
  hipd/netdev.c:1192: warning: cast discards qualifiers from pointer target 
type 
   xx (there were encoding issues in this line) xx
  hipd/netdev.c:1391: warning: cast discards qualifiers from pointer target 
type 

Modified:
  M  hipd/netdev.c
  M  hipd/netdev.h
  M  lib/tool/nlink.h

=== modified file 'hipd/netdev.c'
--- hipd/netdev.c       2010-05-25 05:48:59 +0000
+++ hipd/netdev.c       2010-05-25 10:26:46 +0000
@@ -1157,7 +1157,7 @@
  * @param arg currently unused
  * @return zero on success and non-zero on error
  */
-int hip_netdev_event(const struct nlmsghdr *msg, int len, void *arg)
+int hip_netdev_event(struct nlmsghdr *msg, int len, void *arg)
 {
     int err            = 0, l = 0, is_add = 0, exists;
     struct ifinfomsg *ifinfo;     /* link layer specific message */
@@ -1388,7 +1388,7 @@
 
         list_for_each_safe(n, t, addresses, c) {
             na  = list_entry(n);
-            in6 = hip_cast_sa_addr((struct sockaddr *) &na->addr);
+            in6 = hip_cast_sa_addr((const struct sockaddr *) &na->addr);
             if (ipv6_addr_is_teredo(in6)) {
                 ipv6_addr_copy(src, in6);
                 match = 1;

=== modified file 'hipd/netdev.h'
--- hipd/netdev.h       2010-04-22 10:12:54 +0000
+++ hipd/netdev.h       2010-05-25 10:26:46 +0000
@@ -27,7 +27,7 @@
 int hip_devaddr2ifindex(struct in6_addr *addr);
 int hip_netdev_init_addresses(struct rtnl_handle *nl);
 void hip_delete_all_addresses(void);
-int hip_netdev_event(const struct nlmsghdr *msg, int len, void *arg);
+int hip_netdev_event(struct nlmsghdr *msg, int len, void *arg);
 int hip_add_iface_local_hit(const hip_hit_t *local_hit);
 int hip_add_iface_local_route(const hip_hit_t *local_hit);
 int hip_select_source_address(struct in6_addr *src, const struct in6_addr 
*dst);

=== modified file 'lib/tool/nlink.h'
--- lib/tool/nlink.h    2010-05-21 10:36:58 +0000
+++ lib/tool/nlink.h    2010-05-25 10:26:46 +0000
@@ -62,7 +62,7 @@
     unsigned int    ipi6_ifindex;
 };
 
-typedef int (*hip_filter_t)(const struct nlmsghdr *n, int len, void *arg);
+typedef int (*hip_filter_t)(struct nlmsghdr *n, int len, void *arg);
 
 int set_up_device(const char *dev, int up);
 int addattr_l(struct nlmsghdr *n, int maxlen, int type, const void *data,

Other related posts:

  • » [hipl-commit] [trunk] Rev 4589: Fixed compilation warnings from hipd/netdev.c - Miika Komu