Fix build without DEBUG/INFO output
authorHenning Rogge <henning.rogge@fkie.fraunhofer.de>
Tue, 17 May 2016 14:27:19 +0000 (16:27 +0200)
committerHenning Rogge <henning.rogge@fkie.fraunhofer.de>
Tue, 17 May 2016 14:27:19 +0000 (16:27 +0200)
src-plugins/nhdp/nhdp/nhdp_domain.c
src-plugins/nhdp/nhdp/nhdp_writer.c
src-plugins/olsrv2/olsrv2/olsrv2_routing.c

index 01cdd50..5681b6e 100644 (file)
@@ -905,7 +905,9 @@ _recalculate_neighbor_metric(
   struct nhdp_link_domaindata *linkdata;
   struct nhdp_neighbor_domaindata *neighdata;
   struct nhdp_metric oldmetric;
+#ifdef OONF_LOG_DEBUG_INFO
   struct netaddr_str nbuf;
+#endif
 
   neighdata = nhdp_domain_get_neighbordata(domain, neigh);
 
index 7e04655..2e67e5b 100644 (file)
@@ -463,9 +463,11 @@ _write_metric_tlv(struct rfc5444_writer *writer, struct rfc5444_writer_address *
       RFC7181_LINKMETRIC_INCOMING_NEIGH,
       RFC7181_LINKMETRIC_OUTGOING_NEIGH,
   };
+#ifdef OONF_LOG_DEBUG_INFO
   static const char *lq_name[4] = {
     "l_in", "l_out", "n_in", "n_out",
   };
+#endif
   struct nhdp_link_domaindata *linkdata;
   struct nhdp_neighbor_domaindata *neighdata;
   struct rfc7181_metric_field metric_encoded[4], tlv_value;
index 03fc225..adb45c9 100644 (file)
@@ -974,7 +974,9 @@ static void
 _process_dijkstra_result(struct nhdp_domain *domain) {
   struct olsrv2_routing_entry *rtentry;
   struct olsrv2_routing_filter *filter;
+#ifdef OONF_LOG_INFO
   struct os_route_str rbuf1, rbuf2;
+#endif
 
   avl_for_each_element(&_routing_tree[domain->index], rtentry, _node) {
     /* initialize rest of route parameters */