ofproto-dpif-xlate: Suppress some warnings on non-Linux OSes
authorYAMAMOTO Takashi <yamamoto@valinux.co.jp>
Tue, 16 Sep 2014 03:45:42 +0000 (12:45 +0900)
committerBen Pfaff <blp@nicira.com>
Tue, 16 Sep 2014 15:11:31 +0000 (08:11 -0700)
These warnings were introduced by
commit 7d031d7e511aeea8dd45348922fe8e3bbdd2956e
("ofproto-dpif-xlate: Work around Linux netdev_max_backlog limit.")
and found by --enable-Werror build on NetBSD.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofproto/ofproto-dpif-xlate.c

index ee8a22d..57afa80 100644 (file)
@@ -4046,6 +4046,7 @@ actions_output_to_local_port(const struct xlate_ctx *ctx)
     return false;
 }
 
+#if defined(__linux__)
 /* Returns the maximum number of packets that the Linux kernel is willing to
  * queue up internally to certain kinds of software-implemented ports, or the
  * default (and rarely modified) value if it cannot be determined. */
@@ -4098,6 +4099,7 @@ count_output_actions(const struct ofpbuf *odp_actions)
     }
     return n;
 }
+#endif /* defined(__linux__) */
 
 /* Returns true if 'odp_actions' contains more output actions than the datapath
  * can reliably handle in one go.  On Linux, this is the value of the
@@ -4105,7 +4107,7 @@ count_output_actions(const struct ofpbuf *odp_actions)
  * packets that the kernel is willing to queue up for processing while the
  * datapath is processing a set of actions. */
 static bool
-too_many_output_actions(const struct ofpbuf *odp_actions)
+too_many_output_actions(const struct ofpbuf *odp_actions OVS_UNUSED)
 {
 #ifdef __linux__
     return (ofpbuf_size(odp_actions) / NL_A_U32_SIZE > netdev_max_backlog()