]> git.puffer.fish Git - mirror/frr.git/commitdiff
*: use void * for printing pointers
authorDavid Lamparter <equinox@opensourcerouting.org>
Tue, 3 Mar 2015 07:51:53 +0000 (08:51 +0100)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 30 May 2016 01:27:26 +0000 (21:27 -0400)
On higher warning levels, compilers expect %p printf arguments to be
void *.  Since format string / argument warnings can be useful
otherwise, let's get rid of this noise by sprinkling casts to void *
over printf calls.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
17 files changed:
bgpd/bgp_aspath.c
bgpd/bgp_vty.c
isisd/isis_spf.c
lib/buffer.c
lib/stream.c
ospf6d/ospf6_intra.c
ospf6d/ospf6_lsa.c
ospf6d/ospf6_route.c
ospf6d/ospf6_spf.c
ospfd/ospf_apiserver.c
ospfd/ospf_flood.c
ospfd/ospf_lsa.c
ospfd/ospf_lsdb.c
ospfd/ospf_packet.c
ospfd/ospf_spf.c
ospfd/ospf_te.c
zebra/zebra_rib.c

index b5c8dccf8710aeb890255f6f6d93a6eb7356368e..4161d149fae3cdf08ed70842985e2e8d5fcc71d6 100644 (file)
@@ -2144,7 +2144,7 @@ aspath_show_all_iterator (struct hash_backet *backet, struct vty *vty)
 
   as = (struct aspath *) backet->data;
 
-  vty_out (vty, "[%p:%u] (%ld) ", backet, backet->key, as->refcnt);
+  vty_out (vty, "[%p:%u] (%ld) ", (void *)backet, backet->key, as->refcnt);
   vty_out (vty, "%s%s", as->str, VTY_NEWLINE);
 }
 
index ea7fbe0ce1e2226f9470d6938e37f968a02ab918..70d2c60010ca116272e3d85634ccb382d20fcd4e 100644 (file)
@@ -12538,7 +12538,7 @@ community_show_all_iterator (struct hash_backet *backet, struct vty *vty)
   struct community *com;
 
   com = (struct community *) backet->data;
-  vty_out (vty, "[%p] (%ld) %s%s", backet, com->refcnt,
+  vty_out (vty, "[%p] (%ld) %s%s", (void *)backet, com->refcnt,
           community_str (com), VTY_NEWLINE);
 }
 
index d5ac85ef50ba93edd61bbdf91edebb418690f1bb..32026f9b17e0d235d0f3f7cb48f734b90cfe72a6 100644 (file)
@@ -1067,8 +1067,8 @@ isis_spf_preload_tent (struct isis_spftree *spftree, int level,
            {
              zlog_warn ("ISIS-Spf: No lsp (%p) found from root "
                   "to L%d DR %s on %s (ID %d)",
-                 lsp, level, rawlspid_print (lsp_id), 
-                 circuit->interface->name, circuit->circuit_id);
+                  (void *)lsp, level, rawlspid_print (lsp_id),
+                  circuit->interface->name, circuit->circuit_id);
               continue;
            }
          isis_spf_process_pseudo_lsp (spftree, lsp,
index 45e2e1c5082d47819de0ca2a97f9e98d7e407c82..b689549ed68c7461de9d852dcb41a5839a6f2213 100644 (file)
@@ -322,7 +322,8 @@ buffer_flush_window (struct buffer *b, int fd, int width, int height,
              /* This should absolutely never occur. */
              zlog_err("%s: corruption detected: iov_small overflowed; "
                       "head %p, tail %p, head->next %p",
-                      __func__, b->head, b->tail, b->head->next);
+                      __func__, (void *)b->head, (void *)b->tail,
+                      (void *)b->head->next);
              iov = XMALLOC(MTYPE_TMP, iov_alloc*sizeof(*iov));
              memcpy(iov, small_iov, sizeof(small_iov));
            }
index 27f13d7698f0baacb684322c6d1599e7b5605491..716f361dc85547e7e005bca608327c8543ad1cc0 100644 (file)
@@ -53,7 +53,7 @@
  */
 #define STREAM_WARN_OFFSETS(S) \
   zlog_warn ("&(struct stream): %p, size: %lu, getp: %lu, endp: %lu\n", \
-             (S), \
+             (void *)(S), \
              (unsigned long) (S)->size, \
              (unsigned long) (S)->getp, \
              (unsigned long) (S)->endp)\
index 1ecac2813f0b0fb9a5fcaa3f299d008754b83c5b..5b92212daa815813bf0579514596c8f1bd6295e4 100644 (file)
@@ -1502,7 +1502,8 @@ ospf6_brouter_debug_print (struct ospf6_route *brouter)
 
   zlog_info ("Brouter: %s via area %s", brouter_name, area_name);
   zlog_info ("  memory: prev: %p this: %p next: %p parent rnode: %p",
-             brouter->prev, brouter, brouter->next, brouter->rnode);
+             (void *)brouter->prev, (void *)brouter, (void *)brouter->next,
+             (void *)brouter->rnode);
   zlog_info ("  type: %d prefix: %s installed: %s changed: %s",
              brouter->type, destination, installed, changed);
   zlog_info ("  lock: %d flags: %s%s%s%s", brouter->lock,
@@ -1550,7 +1551,7 @@ ospf6_intra_brouter_calculation (struct ospf6_area *oa)
           IS_OSPF6_DEBUG_ROUTE (MEMORY))
         {
           zlog_info ("%p: mark as removing: area %s brouter %s",
-                     brouter, oa->name, brouter_name);
+                     (void *)brouter, oa->name, brouter_name);
           ospf6_brouter_debug_print (brouter);
         }
     }
@@ -1582,7 +1583,7 @@ ospf6_intra_brouter_calculation (struct ospf6_area *oa)
           IS_OSPF6_DEBUG_ROUTE (MEMORY))
         {
           zlog_info ("%p: transfer: area %s brouter %s",
-                     brouter, oa->name, brouter_name);
+                     (void *)brouter, oa->name, brouter_name);
           ospf6_brouter_debug_print (brouter);
         }
     }
index 317e33ba7b91d7424fa8d22a692a1a5a0be1191a..3f008d3d9f8e80dc259722c8d9956bb468e10183 100644 (file)
@@ -493,8 +493,8 @@ ospf6_lsa_show_internal (struct vty *vty, struct ospf6_lsa *lsa)
   vty_out (vty, "Flag: %x %s", lsa->flag, VNL);
   vty_out (vty, "Lock: %d %s", lsa->lock, VNL);
   vty_out (vty, "ReTx Count: %d%s", lsa->retrans_count, VNL);
-  vty_out (vty, "Threads: Expire: %p, Refresh: %p %s",
-          lsa->expire, lsa->refresh, VNL);
+  vty_out (vty, "Threads: Expire: 0x%p, Refresh: 0x%p %s",
+           (void *)lsa->expire, (void *)lsa->refresh, VNL);
   vty_out (vty, "%s", VNL);
   return;
 }
index 86c908bb38edd17b12d776dcf1136e27ddc03a05..d174cfbb9164e8b9ce140c1d59e13a3cda5509ce 100644 (file)
@@ -597,7 +597,7 @@ ospf6_route_add (struct ospf6_route *route,
 
   if (IS_OSPF6_DEBUG_ROUTE (MEMORY))
     zlog_debug ("%s %p: route add %p: %s", ospf6_route_table_name (table),
-                table, route, buf);
+                (void *)table, (void *)route, buf);
   else if (IS_OSPF6_DEBUG_ROUTE (TABLE))
     zlog_debug ("%s: route add: %s", ospf6_route_table_name (table), buf);
 
@@ -631,7 +631,8 @@ ospf6_route_add (struct ospf6_route *route,
         {
           if (IS_OSPF6_DEBUG_ROUTE (MEMORY))
             zlog_debug ("%s %p: route add %p: needless update of %p",
-                        ospf6_route_table_name (table), table, route, old);
+                        ospf6_route_table_name (table),
+                        (void *)table, (void *)route, (void *)old);
           else if (IS_OSPF6_DEBUG_ROUTE (TABLE))
             zlog_debug ("%s: route add: needless update",
                         ospf6_route_table_name (table));
@@ -645,7 +646,8 @@ ospf6_route_add (struct ospf6_route *route,
 
       if (IS_OSPF6_DEBUG_ROUTE (MEMORY))
         zlog_debug ("%s %p: route add %p: update of %p",
-                    ospf6_route_table_name (table), table, route, old);
+                    ospf6_route_table_name (table),
+                    (void *)table, (void *)route, (void *)old);
       else if (IS_OSPF6_DEBUG_ROUTE (TABLE))
         zlog_debug ("%s: route add: update",
                     ospf6_route_table_name (table));
@@ -686,7 +688,8 @@ ospf6_route_add (struct ospf6_route *route,
     {
       if (IS_OSPF6_DEBUG_ROUTE (MEMORY))
         zlog_debug ("%s %p: route add %p: another path: prev %p, next %p",
-                   ospf6_route_table_name (table), table, route, prev, next);
+                    ospf6_route_table_name (table),
+                    (void *)table, (void *)route, (void *)prev, (void *)next);
       else if (IS_OSPF6_DEBUG_ROUTE (TABLE))
         zlog_debug ("%s: route add: another path found",
                     ospf6_route_table_name (table));
@@ -711,7 +714,8 @@ ospf6_route_add (struct ospf6_route *route,
           SET_FLAG (route->flag, OSPF6_ROUTE_BEST);
           if (IS_OSPF6_DEBUG_ROUTE (MEMORY))
             zlog_info ("%s %p: route add %p: replacing previous best: %p",
-                       ospf6_route_table_name (table), table, route, next);
+                       ospf6_route_table_name (table),
+                       (void *)table, (void *)route, (void *)next);
         }
 
       route->installed = now;
@@ -733,7 +737,7 @@ ospf6_route_add (struct ospf6_route *route,
   /* Else, this is the brand new route regarding to the prefix */
   if (IS_OSPF6_DEBUG_ROUTE (MEMORY))
     zlog_debug ("%s %p: route add %p: brand new route",
-                ospf6_route_table_name (table), table, route);
+                ospf6_route_table_name (table), (void *)table, (void *)route);
   else if (IS_OSPF6_DEBUG_ROUTE (TABLE))
     zlog_debug ("%s: route add: brand new route",
                 ospf6_route_table_name (table));
@@ -812,7 +816,8 @@ ospf6_route_remove (struct ospf6_route *route,
 
   if (IS_OSPF6_DEBUG_ROUTE (MEMORY))
     zlog_debug ("%s %p: route remove %p: %s",
-                ospf6_route_table_name (table), table, route, buf);
+                ospf6_route_table_name (table),
+                (void *)table, (void *)route, buf);
   else if (IS_OSPF6_DEBUG_ROUTE (TABLE))
     zlog_debug ("%s: route remove: %s", ospf6_route_table_name (table), buf);
 
@@ -884,8 +889,8 @@ ospf6_route_head (struct ospf6_route_table *table)
 
   if (IS_OSPF6_DEBUG_ROUTE (MEMORY))
     zlog_info ("%s %p: route head: %p<-[%p]->%p",
-               ospf6_route_table_name (table), table,
-               route->prev, route, route->next);
+               ospf6_route_table_name (table), (void *)table,
+               (void *)route->prev, (void *)route, (void *)route->next);
 
   return route;
 }
@@ -897,8 +902,8 @@ ospf6_route_next (struct ospf6_route *route)
 
   if (IS_OSPF6_DEBUG_ROUTE (MEMORY))
     zlog_info ("%s %p: route next: %p<-[%p]->%p",
-               ospf6_route_table_name (route->table), route->table,
-               route->prev, route, route->next);
+               ospf6_route_table_name (route->table), (void *)route->table,
+               (void *)route->prev, (void *)route, (void *)route->next);
 
   ospf6_route_unlock (route);
   if (next)
@@ -1099,7 +1104,7 @@ ospf6_route_show_detail (struct vty *vty, struct ospf6_route *route)
            (CHECK_FLAG (route->flag, OSPF6_ROUTE_CHANGE) ? "C" : "-"),
            VNL);
   vty_out (vty, "Memory: prev: %p this: %p next: %p%s",
-           route->prev, route, route->next, VNL);
+           (void *)route->prev, (void *)route, (void *)route->next, VNL);
 
   /* Path section */
 
index 7dc4801a8d18c60c55c0794874eb971c83b9c42a..5b77bf00a691797971ba9e13f9519351805433cb 100644 (file)
@@ -689,7 +689,7 @@ ospf6_spf_schedule (struct ospf6 *ospf6, unsigned int reason)
     {
       if (IS_OSPF6_DEBUG_SPF(PROCESS) || IS_OSPF6_DEBUG_SPF (TIME))
         zlog_debug ("SPF: calculation timer is already scheduled: %p",
-                   ospf6->t_spf_calc);
+                    (void *)ospf6->t_spf_calc);
       return;
     }
 
index db1ccda72ae0137d2c88d7d3f919f1e6f1bd0e64..92f68f75f80c0c0848ee94105facdb989f4ce76e 100644 (file)
@@ -244,7 +244,8 @@ static int
 ospf_apiserver_new_lsa_hook (struct ospf_lsa *lsa)
 {
   if (IS_DEBUG_OSPF_EVENT)
-    zlog_debug ("API: Put LSA(%p)[%s] into reserve, total=%ld", lsa, dump_lsa_key (lsa), lsa->lsdb->total);
+    zlog_debug ("API: Put LSA(%p)[%s] into reserve, total=%ld", (void *)lsa,
+                dump_lsa_key (lsa), lsa->lsdb->total);
   return 0;
 }
 
@@ -252,7 +253,8 @@ static int
 ospf_apiserver_del_lsa_hook (struct ospf_lsa *lsa)
 {
   if (IS_DEBUG_OSPF_EVENT)
-    zlog_debug ("API: Get LSA(%p)[%s] from reserve, total=%ld", lsa, dump_lsa_key (lsa), lsa->lsdb->total);
+    zlog_debug ("API: Get LSA(%p)[%s] from reserve, total=%ld", (void *)lsa,
+                dump_lsa_key (lsa), lsa->lsdb->total);
   return 0;
 }
 
@@ -395,7 +397,8 @@ ospf_apiserver_free (struct ospf_apiserver *apiserv)
   listnode_delete (apiserver_list, apiserv);
 
   if (IS_DEBUG_OSPF_EVENT)
-    zlog_debug ("API: Delete apiserv(%p), total#(%d)", apiserv, apiserver_list->count);
+    zlog_debug ("API: Delete apiserv(%p), total#(%d)",
+                (void *)apiserv, apiserver_list->count);
 
   /* And free instance. */
   XFREE (MTYPE_OSPF_APISERVER, apiserv);
@@ -755,7 +758,8 @@ ospf_apiserver_accept (struct thread *thread)
 #endif /* USE_ASYNC_READ */
 
   if (IS_DEBUG_OSPF_EVENT)
-    zlog_debug ("API: New apiserv(%p), total#(%d)", apiserv, apiserver_list->count);
+    zlog_debug ("API: New apiserv(%p), total#(%d)",
+                (void *)apiserv, apiserver_list->count);
 
   return 0;
 }
@@ -944,7 +948,7 @@ ospf_apiserver_register_opaque_type (struct ospf_apiserver *apiserv,
   if (IS_DEBUG_OSPF_EVENT)
     zlog_debug ("API: Add LSA-type(%d)/Opaque-type(%d) into"
                " apiserv(%p), total#(%d)", 
-               lsa_type, opaque_type, apiserv, 
+               lsa_type, opaque_type, (void *)apiserv, 
                listcount (apiserv->opaque_types));
 
   return 0;
@@ -976,7 +980,7 @@ ospf_apiserver_unregister_opaque_type (struct ospf_apiserver *apiserv,
           if (IS_DEBUG_OSPF_EVENT)
             zlog_debug ("API: Del LSA-type(%d)/Opaque-type(%d)"
                        " from apiserv(%p), total#(%d)", 
-                       lsa_type, opaque_type, apiserv, 
+                       lsa_type, opaque_type, (void *)apiserv,
                        listcount (apiserv->opaque_types));
 
          return 0;
index c641b190fb79093a080dd6e24b3e2ed111e143f8..05b1724d0d7cd0a1a5a7172be84f4053803a6df5 100644 (file)
@@ -262,7 +262,7 @@ ospf_flood (struct ospf *ospf, struct ospf_neighbor *nbr,
     zlog_debug ("LSA[Flooding]: start, NBR %s (%s), cur(%p), New-LSA[%s]",
                inet_ntoa (nbr->router_id),
                LOOKUP (ospf_nsm_state_msg, nbr->state),
-               current,
+               (void *)current,
                dump_lsa_key (new));
 
   lsa_ack_flag = 0;
@@ -602,7 +602,8 @@ ospf_flood_through_area (struct ospf_area *area,
            * for the link on which the LSA has received.
            */
           if (IS_DEBUG_OSPF (lsa, LSA_FLOODING))
-            zlog_debug ("Type-9 Opaque-LSA: lsa->oi(%p) != oi(%p)", lsa->oi, oi);
+            zlog_debug ("Type-9 Opaque-LSA: lsa->oi(%p) != oi(%p)",
+                        (void *)lsa->oi, (void *)oi);
           continue;
         }
 #endif /* HAVE_OPAQUE_LSA */
index b2c738f1466cd152bdceffc714aad980679bef34..62c455e7744056a8bfc2c742fc62598513aee80f 100644 (file)
@@ -259,7 +259,7 @@ ospf_lsa_dup (struct ospf_lsa *lsa)
   new->refresh_list = -1;
 
   if (IS_DEBUG_OSPF (lsa, LSA))
-    zlog_debug ("LSA: duplicated %p (new: %p)", lsa, new);
+    zlog_debug ("LSA: duplicated %p (new: %p)", (void *)lsa, (void *)new);
 
   return new;
 }
@@ -271,7 +271,7 @@ ospf_lsa_free (struct ospf_lsa *lsa)
   assert (lsa->lock == 0);
   
   if (IS_DEBUG_OSPF (lsa, LSA))
-    zlog_debug ("LSA: freed %p", lsa);
+    zlog_debug ("LSA: freed %p", (void *)lsa);
 
   /* Delete LSA data. */
   if (lsa->data != NULL)
@@ -347,7 +347,7 @@ ospf_lsa_data_free (struct lsa_header *lsah)
 {
   if (IS_DEBUG_OSPF (lsa, LSA))
     zlog_debug ("LSA[Type%d:%s]: data freed %p",
-              lsah->type, inet_ntoa (lsah->id), lsah);
+              lsah->type, inet_ntoa (lsah->id), (void *)lsah);
 
   XFREE (MTYPE_OSPF_LSA_DATA, lsah);
 }
@@ -914,7 +914,7 @@ ospf_router_lsa_originate (struct ospf_area *area)
   if (IS_DEBUG_OSPF (lsa, LSA_GENERATE))
     {
       zlog_debug ("LSA[Type%d:%s]: Originate router-LSA %p",
-                new->data->type, inet_ntoa (new->data->id), new);
+                new->data->type, inet_ntoa (new->data->id), (void *)new);
       ospf_lsa_header_dump (new->data);
     }
 
@@ -1149,7 +1149,7 @@ ospf_network_lsa_update (struct ospf_interface *oi)
   if (IS_DEBUG_OSPF (lsa, LSA_GENERATE))
     {
       zlog_debug ("LSA[Type%d:%s]: Originate network-LSA %p",
-                new->data->type, inet_ntoa (new->data->id), new);
+                new->data->type, inet_ntoa (new->data->id), (void *)new);
       ospf_lsa_header_dump (new->data);
     }
 
@@ -1326,7 +1326,7 @@ ospf_summary_lsa_originate (struct prefix_ipv4 *p, u_int32_t metric,
   if (IS_DEBUG_OSPF (lsa, LSA_GENERATE))
     {
       zlog_debug ("LSA[Type%d:%s]: Originate summary-LSA %p",
-                new->data->type, inet_ntoa (new->data->id), new);
+                new->data->type, inet_ntoa (new->data->id), (void *)new);
       ospf_lsa_header_dump (new->data);
     }
 
@@ -1469,7 +1469,7 @@ ospf_summary_asbr_lsa_originate (struct prefix_ipv4 *p, u_int32_t metric,
   if (IS_DEBUG_OSPF (lsa, LSA_GENERATE))
     {
       zlog_debug ("LSA[Type%d:%s]: Originate summary-ASBR-LSA %p",
-                new->data->type, inet_ntoa (new->data->id), new);
+                new->data->type, inet_ntoa (new->data->id), (void *)new);
       ospf_lsa_header_dump (new->data);
     }
 
@@ -2110,7 +2110,7 @@ ospf_external_lsa_originate (struct ospf *ospf, struct external_info *ei)
   if (IS_DEBUG_OSPF (lsa, LSA_GENERATE))
     {
       zlog_debug ("LSA[Type%d:%s]: Originate AS-external-LSA %p",
-                new->data->type, inet_ntoa (new->data->id), new);
+                new->data->type, inet_ntoa (new->data->id), (void *)new);
       ospf_lsa_header_dump (new->data);
     }
 
@@ -2316,7 +2316,8 @@ ospf_external_lsa_refresh_default (struct ospf *ospf)
       if (lsa)
        {
          if (IS_DEBUG_OSPF_EVENT)
-           zlog_debug ("LSA[Type5:0.0.0.0]: Refresh AS-external-LSA %p", lsa);
+           zlog_debug ("LSA[Type5:0.0.0.0]: Refresh AS-external-LSA %p",
+                      (void *)lsa);
          ospf_external_lsa_refresh (ospf, lsa, ei, LSA_REFRESH_FORCE);
        }
       else
@@ -2746,7 +2747,7 @@ ospf_lsa_install (struct ospf *ospf, struct ospf_interface *oi,
             {
              zlog_debug ("ospf_lsa_install() Premature Aging "
                         "lsa 0x%p, seqnum 0x%x",
-                        lsa, ntohl(lsa->data->ls_seqnum));
+                        (void *)lsa, ntohl(lsa->data->ls_seqnum));
              ospf_lsa_header_dump (lsa->data);
             }
         }
@@ -2849,9 +2850,9 @@ ospf_lsa_install (struct ospf *ospf, struct ospf_interface *oi,
     {
       if (IS_DEBUG_OSPF (lsa, LSA_INSTALL))
         zlog_debug ("LSA[Type%d:%s]: Install LSA 0x%p, MaxAge",
-                   new->data->type, 
-                   inet_ntoa (new->data->id), 
-                   lsa);
+                   new->data->type,
+                   inet_ntoa (new->data->id),
+                   (void *)lsa);
       ospf_lsa_maxage (ospf, lsa);
     }
 
@@ -2938,7 +2939,7 @@ ospf_maxage_lsa_remover (struct thread *thread)
        if (CHECK_FLAG (lsa->flags, OSPF_LSA_PREMATURE_AGE))
           {
             if (IS_DEBUG_OSPF (lsa, LSA_FLOODING))
-              zlog_debug ("originating new lsa for lsa 0x%p\n", lsa);
+              zlog_debug ("originating new lsa for lsa 0x%p\n", (void *)lsa);
             ospf_lsa_refresh (ospf, lsa);
           }
 
@@ -3005,7 +3006,7 @@ ospf_lsa_maxage (struct ospf *ospf, struct ospf_lsa *lsa)
     {
       if (IS_DEBUG_OSPF (lsa, LSA_FLOODING))
        zlog_debug ("LSA[Type%d:%s]: %p already exists on MaxAge LSA list",
-                  lsa->data->type, inet_ntoa (lsa->data->id), lsa);
+                  lsa->data->type, inet_ntoa (lsa->data->id), (void *)lsa);
       return;
     }
 
@@ -3020,7 +3021,8 @@ ospf_lsa_maxage (struct ospf *ospf, struct ospf_lsa *lsa)
        {
          if (IS_DEBUG_OSPF (lsa, LSA_FLOODING))
            zlog_debug ("LSA[%s]: found LSA (%p) in table for LSA %p %d",
-                       dump_lsa_key (lsa), rn->info, lsa, lsa_prefix.prefixlen);
+                       dump_lsa_key (lsa), rn->info, (void *)lsa,
+                       lsa_prefix.prefixlen);
          route_unlock_node (rn);
        }
       else
@@ -3747,9 +3749,9 @@ ospf_refresher_register_lsa (struct ospf *ospf, struct ospf_lsa *lsa)
       lsa->refresh_list = index;
 
       if (IS_DEBUG_OSPF (lsa, LSA_REFRESH))
-        zlog_debug ("LSA[Refresh:Type%d:%s]: ospf_refresher_register_lsa() "
-                   "setting refresh_list on lsa %p (slot %d)",
-                   lsa->data->type, inet_ntoa (lsa->data->id), lsa, index);
+        zlog_debug ("LSA[Refresh:Type%d:%s]: ospf_refresher_register_lsa(): "
+                   "setting refresh_list on lsa %p (slod %d)", 
+                   lsa->data->type, inet_ntoa (lsa->data->id), (void *)lsa, index);
     }
 }
 
@@ -3820,9 +3822,9 @@ ospf_lsa_refresh_walker (struct thread *t)
            {
              if (IS_DEBUG_OSPF (lsa, LSA_REFRESH))
                zlog_debug ("LSA[Refresh:Type%d:%s]: ospf_lsa_refresh_walker(): "
-                          "refresh lsa %p (slot %d)", 
-                          lsa->data->type, inet_ntoa (lsa->data->id), lsa, i);
-             
+                          "refresh lsa %p (slot %d)",
+                           lsa->data->type, inet_ntoa (lsa->data->id), (void *)lsa, i);
+
              assert (lsa->lock > 0);
              list_delete_node (refresh_list, node);
              lsa->refresh_list = -1;
index f7cf60fd093951aa0939d87c6bafe6ea6bea7827..b92e7494ade3f5002ce0a1d28b6331c3d5256523 100644 (file)
@@ -158,7 +158,7 @@ ospf_lsdb_delete (struct ospf_lsdb *lsdb, struct ospf_lsa *lsa)
       if (lsa)
         zlog_warn ("LSA[Type%d:%s]: LSA %p, lsa->lsdb %p",
                    lsa->data->type, inet_ntoa (lsa->data->id),
-                   lsa, lsa->lsdb);
+                   (void *)lsa, (void *)lsa->lsdb);
       return;
     }
   
index 2126ea3c9365b92dd76f93e3f7cd80f9e7a302ee..78199f6eceea3d67d670cbbf05ba208415b4fc70 100644 (file)
@@ -1714,7 +1714,7 @@ ospf_ls_upd_list_lsa (struct ospf_neighbor *nbr, struct stream *s,
 
       if (IS_DEBUG_OSPF_EVENT)
        zlog_debug("LSA[Type%d:%s]: %p new LSA created with Link State Update",
-                 lsa->data->type, inet_ntoa (lsa->data->id), lsa);
+                 lsa->data->type, inet_ntoa (lsa->data->id), (void *)lsa);
       listnode_add (lsas, lsa);
     }
 
@@ -1796,7 +1796,8 @@ ospf_ls_upd (struct ospf *ospf, struct ip *iph, struct ospf_header *ospfh,
 
 #define DISCARD_LSA(L,N) {\
         if (IS_DEBUG_OSPF_EVENT) \
-          zlog_debug ("ospf_lsa_discard() in ospf_ls_upd() point %d: lsa %p Type-%d", N, lsa, (int) lsa->data->type); \
+          zlog_debug ("ospf_lsa_discard() in ospf_ls_upd() point %d: lsa %p" \
+                      " Type-%d", N, (void *)lsa, (int) lsa->data->type); \
         ospf_lsa_discard (L); \
        continue; }
 
@@ -1981,7 +1982,7 @@ ospf_ls_upd (struct ospf *ospf, struct ip *iph, struct ospf_header *ospfh,
               ospf_lsa_flush_area(lsa,out_if->area);
               if(IS_DEBUG_OSPF_EVENT)
                 zlog_debug ("ospf_lsa_discard() in ospf_ls_upd() point 9: lsa %p Type-%d",
-                            lsa, (int) lsa->data->type);
+                            (void *)lsa, (int) lsa->data->type);
               ospf_lsa_discard (lsa);
               Flag = 1;
             }
index bcd5e6193c23d17378cfb3122495339a005bd02f..9f6c6f471b027eb61e4674411ed8b794933d0def 100644 (file)
@@ -1008,7 +1008,7 @@ ospf_spf_dump (struct vertex *v, int i)
     for (ALL_LIST_ELEMENTS_RO (v->parents, nnode, parent))
       {
         zlog_debug (" nexthop %p %s %s", 
-                    parent->nexthop,
+                    (void *)parent->nexthop,
                     inet_ntoa (parent->nexthop->router),
                     parent->nexthop->oi ? IF_NAME(parent->nexthop->oi)
                                         : "NULL");
@@ -1438,7 +1438,7 @@ ospf_spf_calculate_schedule (struct ospf *ospf, ospf_spf_reason_t reason)
     {
       if (IS_DEBUG_OSPF_EVENT)
         zlog_debug ("SPF: calculation timer is already scheduled: %p",
-                   ospf->t_spf_calc);
+                    (void *)ospf->t_spf_calc);
       return;
     }
   
index 565a61aaae2165ceb929031e7e81ce0fa2c1ec3b..db06623ddfbe2789a5f2104b3def0146aca97326 100644 (file)
@@ -557,7 +557,7 @@ ospf_mpls_te_new_if (struct interface *ifp)
 
   if (lookup_linkparams_by_ifp (ifp) != NULL)
     {
-      zlog_warn ("ospf_mpls_te_new_if: ifp(%p) already in use?", ifp);
+      zlog_warn ("ospf_mpls_te_new_if: ifp(%p) already in use?", (void *)ifp);
       rc = 0; /* Do nothing here. */
       goto out;
     }
index f7290caea9db827bc9853766e287e3e4d7dd0bbd..656f5bb7521e6f6a9dd0915999cf8a1e5beb795e 100644 (file)
@@ -82,7 +82,8 @@ static const struct
 /* RPF lookup behaviour */
 static enum multicast_mode ipv4_multicast_mode = MCAST_NO_CONFIG;
 
-static void
+
+static void __attribute__((format (printf, 5, 6)))
 _rnode_zlog(const char *_func, vrf_id_t vrf_id, struct route_node *rn, int priority,
            const char *msgfmt, ...)
 {
@@ -1678,7 +1679,8 @@ rib_process (struct route_node *rn)
           if (rib != fib)
             {
               if (IS_ZEBRA_DEBUG_RIB)
-               rnode_debug (rn, vrf_id, "rn %p, removing rib %p", rn, rib);
+               rnode_debug (rn, vrf_id, "rn %p, removing rib %p",
+                            (void *)rn, (void *)rib);
              rib_unlink (rn, rib);
             }
           else
@@ -1813,7 +1815,7 @@ rib_process (struct route_node *rn)
     {
       if (IS_ZEBRA_DEBUG_RIB)
        rnode_debug (rn, vrf_id, "Updating existing route, select %p, fib %p",
-                    select, fib);
+                     (void *)select, (void *)fib);
       if (CHECK_FLAG (select->flags, ZEBRA_FLAG_CHANGED))
         {
           if (info->safi == SAFI_UNICAST)
@@ -1886,7 +1888,7 @@ rib_process (struct route_node *rn)
   if (fib)
     {
       if (IS_ZEBRA_DEBUG_RIB)
-       rnode_debug (rn, vrf_id, "Removing existing route, fib %p", fib);
+        rnode_debug (rn, vrf_id, "Removing existing route, fib %p", (void *)fib);
 
       if (info->safi == SAFI_UNICAST)
         zfpm_trigger_update (rn, "removing existing route");
@@ -1919,7 +1921,7 @@ rib_process (struct route_node *rn)
   if (select)
     {
       if (IS_ZEBRA_DEBUG_RIB)
-       rnode_debug (rn, "Adding route, select %p", select);
+        rnode_debug (rn, "Adding route, select %p", (void *)select);
 
       if (info->safi == SAFI_UNICAST)
         zfpm_trigger_update (rn, "new route selected");
@@ -1987,7 +1989,7 @@ rib_process (struct route_node *rn)
   if (del)
     {
       if (IS_ZEBRA_DEBUG_RIB)
-        rnode_debug (rn, vrf_id, "Deleting fib %p, rn %p", del, rn);
+       rnode_debug (rn, vrf_id, "Deleting fib %p, rn %p", (void *)del, (void *)rn);
       rib_unlink (rn, del);
     }
 
@@ -2126,7 +2128,7 @@ rib_meta_queue_add (struct meta_queue *mq, struct route_node *rn)
        {
          if (IS_ZEBRA_DEBUG_RIB_DETAILED)
            rnode_debug (rn, rib->vrf_id,  "rn %p is already queued in sub-queue %u",
-                        rn, qindex);
+                        (void *)rn, qindex);
          continue;
        }
 
@@ -2137,7 +2139,7 @@ rib_meta_queue_add (struct meta_queue *mq, struct route_node *rn)
 
       if (IS_ZEBRA_DEBUG_RIB_DETAILED)
        rnode_debug (rn, rib->vrf_id, "queued rn %p into sub-queue %u",
-                    rn, qindex);
+                    (void *)rn, qindex);
 
       zvrf = zebra_vrf_lookup (rib->vrf_id);
       if (zvrf)
@@ -2155,7 +2157,7 @@ rib_queue_add (struct route_node *rn)
   if (!rnode_to_ribs (rn))
     {
       zlog_debug ("%s: called for route_node (%p, %d) with no ribs",
-                  __func__, rn, rn->lock);
+                  __func__, (void *)rn, rn->lock);
       zlog_backtrace(LOG_DEBUG);
       return;
     }
@@ -2321,7 +2323,7 @@ rib_addnode (struct route_node *rn, struct rib *rib, int process)
   if (CHECK_FLAG (rib->status, RIB_ENTRY_REMOVED))
     {
       if (IS_ZEBRA_DEBUG_RIB)
-        rnode_debug (rn, rib->vrf_id, "rn %p, un-removed rib %p", rn, rib);
+         rnode_debug (rn, rib->vrf_id, "rn %p, un-removed rib %p", (void *)rn, (void *)rib);
 
       UNSET_FLAG (rib->status, RIB_ENTRY_REMOVED);
       return;
@@ -2346,7 +2348,7 @@ rib_unlink (struct route_node *rn, struct rib *rib)
   assert (rn && rib);
 
   if (IS_ZEBRA_DEBUG_RIB)
-    rnode_debug (rn, rib->vrf_id, "rn %p, rib %p", rn, rib);
+         rnode_debug (rn, rib->vrf_id, "rn %p, rib %p", (void *)rn, (void *)rib);
 
   dest = rib_dest_from_rnode (rn);
 
@@ -2373,7 +2375,7 @@ rib_delnode (struct route_node *rn, struct rib *rib)
   afi_t afi;
 
   if (IS_ZEBRA_DEBUG_RIB)
-    rnode_debug (rn, rib->vrf_id, "rn %p, rib %p, removing", rn, rib);
+    rnode_debug (rn, rib->vrf_id, "rn %p, rib %p, removing", (void *)rn, (void *)rib);
   SET_FLAG (rib->status, RIB_ENTRY_REMOVED);
 
   afi = (rn->p.family == AF_INET) ? AFI_IP :
@@ -2502,7 +2504,7 @@ rib_add_ipv4 (int type, u_short instance, int flags, struct prefix_ipv4 *p,
           inet_ntop (p->family, &p->prefix, buf, INET6_ADDRSTRLEN);
           zlog_debug ("%u:%s/%d: Inserting route rn %p, rib %p (type %d) "
                       "existing %p",
-                      vrf_id, buf, p->prefixlen, rn, rib, rib->type, same);
+                      vrf_id, buf, p->prefixlen, (void *)rn, (void *)rib, rib->type, (void *)same);
         }
 
       if (IS_ZEBRA_DEBUG_RIB_DETAILED)
@@ -2531,7 +2533,7 @@ void _rib_dump (const char * func,
   struct nexthop *nexthop, *tnexthop;
   int recursing;
 
-  zlog_debug ("%s: dumping RIB entry %p for %s vrf %u", func, rib,
+  zlog_debug ("%s: dumping RIB entry %p for %s vrf %u", func, (const void *)rib,
               prefix2str(pp, straddr, sizeof(straddr)), rib->vrf_id);
   zlog_debug
   (
@@ -2618,8 +2620,8 @@ void rib_lookup_and_dump (struct prefix_ipv4 * p, vrf_id_t vrf_id)
     (
       "%s: rn %p, rib %p: %s, %s",
       __func__,
-      rn,
-      rib,
+      (void *)rn,
+      (void *)rib,
       (CHECK_FLAG (rib->status, RIB_ENTRY_REMOVED) ? "removed" : "NOT removed"),
       (CHECK_FLAG (rib->flags, ZEBRA_FLAG_SELECTED) ? "selected" : "NOT selected")
     );
@@ -2738,7 +2740,8 @@ rib_add_ipv4_multipath (struct prefix_ipv4 *p, struct rib *rib, safi_t safi)
           inet_ntop (p->family, &p->prefix, buf, INET6_ADDRSTRLEN);
           zlog_debug ("%u:%s/%d: Inserting route rn %p, rib %p (type %d) "
                       "existing %p",
-                      rib->vrf_id, buf, p->prefixlen, rn, rib, rib->type, same);
+                      rib->vrf_id, buf, p->prefixlen, (void *)rn,
+                     (void *)rib, rib->type, (void *)same);
         }
 
       if (IS_ZEBRA_DEBUG_RIB_DETAILED)
@@ -3423,7 +3426,8 @@ rib_add_ipv6 (int type, u_short instance, int flags, struct prefix_ipv6 *p,
           inet_ntop (p->family, &p->prefix, buf, INET6_ADDRSTRLEN);
           zlog_debug ("%u:%s/%d: Inserting route rn %p, rib %p (type %d) "
                       "existing %p",
-                      vrf_id, buf, p->prefixlen, rn, rib, rib->type, same);
+                      vrf_id, buf, p->prefixlen, (void *)rn,
+                     (void *)rib, rib->type, (void *)same);
         }
 
       if (IS_ZEBRA_DEBUG_RIB_DETAILED)