Add const to char * to quiet warnings.
Note two warnings in comments. The serious one is that struct
interface->ifindex probably needs to be signed, ssince we store and
compare to -1.
diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c
index e0f2a8f..9027cd6 100644
--- a/zebra/kernel_socket.c
+++ b/zebra/kernel_socket.c
@@ -276,6 +276,7 @@
sdl = (struct sockaddr_dl *)cp;
break;
}
+ /* XXX warning: pointer of type `void *' used in arithmetic */
cp += SAROUNDUP(cp);
}
}
@@ -324,6 +325,10 @@
* If ifp does not exist or has an invalid index (-1), create or
* fill in an interface.
*/
+ /*
+ * XXX warning: comparison between signed and unsigned
+ * ifindex should probably be signed
+ */
if ((ifp == NULL) || (ifp->ifindex == -1))
{
/*
@@ -812,7 +817,7 @@
static void
rtmsg_debug (struct rt_msghdr *rtm)
{
- char *type = "Unknown";
+ const char *type = "Unknown";
struct message *mes;
for (mes = rtm_type_str; mes->str; mes++)