]> git.proxmox.com Git - mirror_ovs.git/commitdiff
Rename UNUSED macro to OVS_UNUSED to avoid naming conflict.
authorBen Pfaff <blp@nicira.com>
Thu, 11 Feb 2010 18:59:47 +0000 (10:59 -0800)
committerBen Pfaff <blp@nicira.com>
Thu, 11 Feb 2010 18:59:47 +0000 (10:59 -0800)
Requested by Jean Tourrilhes <jt@hpl.hp.com>.

42 files changed:
extras/ezio/ovs-switchui.c
extras/ezio/terminal.c
extras/ezio/tty.c
lib/backtrace.c
lib/compiler.h
lib/coverage.c
lib/dhcp-client.c
lib/dpif-linux.c
lib/dpif-netdev.c
lib/fatal-signal.c
lib/leak-checker.c
lib/learning-switch.c
lib/netdev-linux.c
lib/netdev.c
lib/ofp-print.c
lib/packets.h
lib/process.c
lib/queue.c
lib/rconn.c
lib/socket-util.c
lib/unixctl.c
lib/vconn-ssl.c
lib/vconn-stream.c
lib/vconn-tcp.c
lib/vconn-unix.c
lib/vconn.c
lib/vlog.c
ofproto/discovery.c
ofproto/executer.c
ofproto/ofproto-sflow.c
ofproto/ofproto.c
tests/test-dhcp-client.c
tests/test-flows.c
tests/test-hmap.c
tests/test-vconn.c
utilities/nlmon.c
utilities/ovs-discover.c
utilities/ovs-dpctl.c
utilities/ovs-ofctl.c
vswitchd/bridge.c
vswitchd/mgmt.c
vswitchd/ovs-vswitchd.c

index cd1f3521c21273a88697c2a9cdd42bcc6c6849ce..e087aa00e0b23c4a89d47cf610ccf24cc51dc4b4 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2009 Nicira Networks, Inc.
+/* Copyright (c) 2008, 2009, 2010 Nicira Networks, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -995,7 +995,7 @@ initialize_terminal(void)
 }
 
 static void
-restore_terminal(void *aux UNUSED)
+restore_terminal(void *aux OVS_UNUSED)
 {
     endwin();
 }
@@ -1444,7 +1444,7 @@ init_reboot_notifier(void)
 }
 
 static void
-sigusr1_handler(int signr UNUSED)
+sigusr1_handler(int signr OVS_UNUSED)
 {
     sigusr1_triggered = true;
 }
@@ -1874,7 +1874,7 @@ yesno(const char *title, bool def)
 }
 
 static void
-cmd_show_version(const struct dict *dict UNUSED)
+cmd_show_version(const struct dict *dict OVS_UNUSED)
 {
     show_string(VERSION BUILDNR);
 }
@@ -1895,7 +1895,7 @@ cmd_browse_status(const struct dict *dict)
 }
 
 static void
-cmd_shell(const struct dict *dict UNUSED)
+cmd_shell(const struct dict *dict OVS_UNUSED)
 {
     const char *home;
 
@@ -1919,7 +1919,7 @@ cmd_shell(const struct dict *dict UNUSED)
 }
 
 static void
-cmd_show_motto(const struct dict *dict UNUSED)
+cmd_show_motto(const struct dict *dict OVS_UNUSED)
 {
     show_string("\"Just Add Ice\"");
 }
@@ -2547,7 +2547,7 @@ disconnected_string(int value)
 }
 
 static void
-cmd_configure(const struct dict *dict UNUSED)
+cmd_configure(const struct dict *dict OVS_UNUSED)
 {
     bool debug_mode = dict_get_bool(dict, "debug", false);
     struct dict config_dict;
@@ -2889,7 +2889,7 @@ cmd_configure(const struct dict *dict UNUSED)
 }
 
 static void
-cmd_set_up_pki(const struct dict *dict UNUSED)
+cmd_set_up_pki(const struct dict *dict OVS_UNUSED)
 {
     static const char def_privkey_file[]
         = "/etc/openflow-switch/of0-privkey.pem";
index e41a987dbc99d51be5422df640a63ac3eb3645e7..090e80e44be0126625c98c90651509fcf9da7fc1 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2009 Nicira Networks, Inc.
+/* Copyright (c) 2008, 2009, 2010 Nicira Networks, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -97,7 +97,7 @@ terminal_run(struct terminal *term, struct ezio *ezio, int input_fd)
 }
 
 void
-terminal_wait(struct terminal *term UNUSED, int input_fd)
+terminal_wait(struct terminal *term OVS_UNUSED, int input_fd)
 {
     poll_fd_wait(input_fd, POLLIN);
 }
index 709b80282917346223e8c8d1fba95c3e3ea8d73c..fefeea15545334ef13803eed6215c80633c9575c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2009 Nicira Networks, Inc.
+/* Copyright (c) 2008, 2009, 2010 Nicira Networks, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -374,7 +374,9 @@ tty_fork_child(int master_fd, char *argv[])
 }
 
 int
-tty_set_window_size(int fd UNUSED, int rows UNUSED, int columns UNUSED)
+tty_set_window_size(int fd OVS_UNUSED,
+                    int rows OVS_UNUSED,
+                    int columns OVS_UNUSED)
 {
 #ifdef TIOCGWINSZ
     struct winsize win;
index 2f47809326ddc9d380e558feb5c5625d31ffdaf8..80cae54a6a15310643631fae55718bbb623a2424 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -25,7 +25,7 @@
 #define THIS_MODULE VLM_backtrace
 #include "vlog.h"
 
-static uintptr_t UNUSED
+static uintptr_t OVS_UNUSED
 get_max_stack(void)
 {
     static const char file_name[] = "/proc/self/maps";
index 17e245fce770ac6d6ba5998d70942ef5e14386f8..0075ca87c1ca75265a76c04824f5f621d9fe9a7c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
 #define COMPILER_H 1
 
 #define NO_RETURN __attribute__((__noreturn__))
-#define UNUSED __attribute__((__unused__))
+#define OVS_UNUSED __attribute__((__unused__))
 #define PACKED __attribute__((__packed__))
 #define PRINTF_FORMAT(FMT, ARG1) __attribute__((__format__(printf, FMT, ARG1)))
 #define STRFTIME_FORMAT(FMT) __attribute__((__format__(__strftime__, FMT, 0)))
index cdc796ec3e661b63a69519a1cd89437c8f21b4e5..92bc2b891184a34dea01cbbf9698214c63c00390 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009 Nicira Networks.
+ * Copyright (c) 2009, 2010 Nicira Networks.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -30,7 +30,7 @@
 static unsigned int epoch;
 
 static void
-coverage_unixctl_log(struct unixctl_conn *conn, const char *args UNUSED)
+coverage_unixctl_log(struct unixctl_conn *conn, const char *args OVS_UNUSED)
 {
     coverage_log(VLL_WARN, false);
     unixctl_command_reply(conn, 200, NULL);
index 4f90781334f80aeaf22fb51f667e40d97ca3c65c..bb331288e8d13f6db4a9ce0540a42a7037e5308e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -768,7 +768,7 @@ dhclient_run_REBINDING(struct dhclient *cli)
 }
 
 static void
-dhclient_run_RELEASED(struct dhclient *cli UNUSED)
+dhclient_run_RELEASED(struct dhclient *cli OVS_UNUSED)
 {
     /* Nothing to do. */
 }
index e7d43811dc66068cc8dece6a12e6e487318a3b17..3920d462f7e5bd374b664bd85d7221e92f2ecfd8 100644 (file)
@@ -107,7 +107,7 @@ dpif_linux_enumerate(struct svec *all_dps)
 }
 
 static int
-dpif_linux_open(const char *name UNUSED, char *suffix, bool create,
+dpif_linux_open(const char *name OVS_UNUSED, char *suffix, bool create,
                 struct dpif **dpifp)
 {
     int minor;
index 720e8cb0278b3a1566a4d39bb6da0b792bcd153f..e9f006c3479978ab43f63de6c4c35e6c90f62d3e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009 Nicira Networks.
+ * Copyright (c) 2009, 2010 Nicira Networks.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -245,7 +245,7 @@ create_dp_netdev(const char *name, int dp_idx, struct dpif **dpifp)
 }
 
 static int
-dpif_netdev_open(const char *name UNUSED, char *suffix, bool create,
+dpif_netdev_open(const char *name OVS_UNUSED, char *suffix, bool create,
                  struct dpif **dpifp)
 {
     if (create) {
@@ -583,7 +583,7 @@ dpif_netdev_port_list(const struct dpif *dpif, struct odp_port *ports, int n)
 }
 
 static int
-dpif_netdev_port_poll(const struct dpif *dpif_, char **devnamep UNUSED)
+dpif_netdev_port_poll(const struct dpif *dpif_, char **devnamep OVS_UNUSED)
 {
     struct dpif_netdev *dpif = dpif_netdev_cast(dpif_);
     if (dpif->dp_serial != dpif->dp->serial) {
index 81805214383df9945a3f3f042c106d0d8c0a8f27..9aa50e420183bff8f39691b8fa42a4b9042b34f5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -227,7 +227,7 @@ fatal_signal_unlink_file_now(const char *file)
 }
 
 static void
-unlink_files(void *aux UNUSED)
+unlink_files(void *aux OVS_UNUSED)
 {
     do_unlink_files(); 
 }
index 8d256bc8c56ef9ad0fd0ef2b2f3242a31536b6a4..4ab55e59493f2303b279bfa45a3eaed57a1d5ad6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 #ifndef HAVE_MALLOC_HOOKS
 void
-leak_checker_start(const char *file_name UNUSED)
+leak_checker_start(const char *file_name OVS_UNUSED)
 {
     VLOG_WARN("not enabling leak checker because the libc in use does not "
               "have the required hooks");
 }
 
 void
-leak_checker_set_limit(off_t max_size UNUSED)
+leak_checker_set_limit(off_t max_size OVS_UNUSED)
 {
 }
 
 void
-leak_checker_claim(const void *p UNUSED)
+leak_checker_claim(const void *p OVS_UNUSED)
 {
 }
 
@@ -180,7 +180,7 @@ reset_hooks(void)
 }
 
 static void *
-hook_malloc(size_t size, const void *caller UNUSED)
+hook_malloc(size_t size, const void *caller OVS_UNUSED)
 {
     void *p;
 
@@ -209,7 +209,7 @@ leak_checker_claim(const void *p)
 }
 
 static void
-hook_free(void *p, const void *caller UNUSED)
+hook_free(void *p, const void *caller OVS_UNUSED)
 {
     if (!p) {
         return;
@@ -225,7 +225,7 @@ hook_free(void *p, const void *caller UNUSED)
 }
 
 static void *
-hook_realloc(void *p, size_t size, const void *caller UNUSED)
+hook_realloc(void *p, size_t size, const void *caller OVS_UNUSED)
 {
     void *q;
 
index ecfa87f6076853cb193117b83dfc59c37b591a83..8ace3ba23fa339a0ab81511abb312ce468c19703 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -517,7 +517,8 @@ process_port_status(struct lswitch *sw, struct rconn *rconn, void *ops_)
 }
 
 static void
-process_phy_port(struct lswitch *sw, struct rconn *rconn UNUSED, void *opp_)
+process_phy_port(struct lswitch *sw, struct rconn *rconn OVS_UNUSED,
+                 void *opp_)
 {
     const struct ofp_phy_port *opp = opp_;
     uint16_t port_no = ntohs(opp->port_no);
index 61994c2fec3a8c347b121a6f37d22ef1c80fce3b..95501b0859cad1838d21b63c4b75cda620fdc061 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009 Nicira Networks.
+ * Copyright (c) 2009, 2010 Nicira Networks.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -192,7 +192,7 @@ netdev_linux_wait(void)
 
 static void
 netdev_linux_cache_cb(const struct rtnetlink_change *change,
-                      void *aux UNUSED)
+                      void *aux OVS_UNUSED)
 {
     struct netdev_linux_cache *cache;
     if (change) {
@@ -1221,7 +1221,7 @@ do_set_addr(struct netdev *netdev,
 
 /* Adds 'router' as a default IP gateway. */
 static int
-netdev_linux_add_router(struct netdev *netdev UNUSED, struct in_addr router)
+netdev_linux_add_router(struct netdev *netdev OVS_UNUSED, struct in_addr router)
 {
     struct in_addr any = { INADDR_ANY };
     struct rtentry rt;
@@ -1388,7 +1388,7 @@ poll_notify(struct list *list)
 
 static void
 netdev_linux_poll_cb(const struct rtnetlink_change *change,
-                     void *aux UNUSED)
+                     void *aux OVS_UNUSED)
 {
     if (change) {
         struct list *list = shash_find_data(&netdev_linux_notifiers,
index f1eb29b521fa83022e706c34e27b69cef2c48be0..82a490419778edcd8601f60569d55f46a6d38059 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -1054,7 +1054,7 @@ restore_flags(struct netdev *netdev)
 /* Retores all the flags on all network devices that we modified.  Called from
  * a signal handler, so it does not attempt to report error conditions. */
 static void
-restore_all_flags(void *aux UNUSED)
+restore_all_flags(void *aux OVS_UNUSED)
 {
     struct netdev *netdev;
     LIST_FOR_EACH (netdev, struct netdev, node, &netdev_list) {
index 9c1afe448719889a28650ce7fdbbe9c0a032a530..e227129927e1cb60da1150f90dc4c06f98739539 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -47,7 +47,7 @@ static void ofp_print_port_name(struct ds *string, uint16_t port);
  *
  * This starts and kills a tcpdump subprocess so it's quite expensive. */
 char *
-ofp_packet_to_string(const void *data, size_t len, size_t total_len UNUSED)
+ofp_packet_to_string(const void *data, size_t len, size_t total_len OVS_UNUSED)
 {
     struct ds ds = DS_EMPTY_INITIALIZER;
     struct ofpbuf buf;
@@ -535,7 +535,7 @@ ofp_print_phy_port(struct ds *string, const struct ofp_phy_port *port)
  * 'string' at the given 'verbosity' level. */
 static void
 ofp_print_switch_features(struct ds *string, const void *oh, size_t len,
-                          int verbosity UNUSED)
+                          int verbosity OVS_UNUSED)
 {
     const struct ofp_switch_features *osf = oh;
     struct ofp_phy_port *port_list;
@@ -565,8 +565,8 @@ ofp_print_switch_features(struct ds *string, const void *oh, size_t len,
 /* Pretty-print the struct ofp_switch_config of 'len' bytes at 'oh' to 'string'
  * at the given 'verbosity' level. */
 static void
-ofp_print_switch_config(struct ds *string, const void *oh, size_t len UNUSED,
-                        int verbosity UNUSED)
+ofp_print_switch_config(struct ds *string, const void *oh,
+                        size_t len OVS_UNUSED, int verbosity OVS_UNUSED)
 {
     const struct ofp_switch_config *osc = oh;
     uint16_t flags;
@@ -739,8 +739,8 @@ ofp_print_flow_mod(struct ds *string, const void *oh, size_t len,
 /* Pretty-print the OFPT_FLOW_EXPIRED packet of 'len' bytes at 'oh' to 'string'
  * at the given 'verbosity' level. */
 static void
-ofp_print_flow_expired(struct ds *string, const void *oh, size_t len UNUSED, 
-                       int verbosity)
+ofp_print_flow_expired(struct ds *string, const void *oh,
+                       size_t len OVS_UNUSED, int verbosity)
 {
     const struct ofp_flow_expired *ofe = oh;
 
@@ -765,8 +765,8 @@ ofp_print_flow_expired(struct ds *string, const void *oh, size_t len UNUSED,
 }
 
 static void
-ofp_print_port_mod(struct ds *string, const void *oh, size_t len UNUSED,
-                   int verbosity UNUSED)
+ofp_print_port_mod(struct ds *string, const void *oh, size_t len OVS_UNUSED,
+                   int verbosity OVS_UNUSED)
 {
     const struct ofp_port_mod *opm = oh;
 
@@ -852,7 +852,7 @@ lookup_error_code(int type, int code)
  * at the given 'verbosity' level. */
 static void
 ofp_print_error_msg(struct ds *string, const void *oh, size_t len, 
-                       int verbosity UNUSED)
+                       int verbosity OVS_UNUSED)
 {
     const struct ofp_error_msg *oem = oh;
     int type = ntohs(oem->type);
@@ -883,8 +883,8 @@ ofp_print_error_msg(struct ds *string, const void *oh, size_t len,
 /* Pretty-print the OFPT_PORT_STATUS packet of 'len' bytes at 'oh' to 'string'
  * at the given 'verbosity' level. */
 static void
-ofp_print_port_status(struct ds *string, const void *oh, size_t len UNUSED,
-                      int verbosity UNUSED)
+ofp_print_port_status(struct ds *string, const void *oh, size_t len OVS_UNUSED,
+                      int verbosity OVS_UNUSED)
 {
     const struct ofp_port_status *ops = oh;
 
@@ -900,8 +900,8 @@ ofp_print_port_status(struct ds *string, const void *oh, size_t len UNUSED,
 }
 
 static void
-ofp_desc_stats_reply(struct ds *string, const void *body, size_t len UNUSED,
-                     int verbosity UNUSED)
+ofp_desc_stats_reply(struct ds *string, const void *body,
+                     size_t len OVS_UNUSED, int verbosity OVS_UNUSED)
 {
     const struct ofp_desc_stats *ods = body;
 
@@ -912,8 +912,8 @@ ofp_desc_stats_reply(struct ds *string, const void *body, size_t len UNUSED,
 }
 
 static void
-ofp_flow_stats_request(struct ds *string, const void *oh, size_t len UNUSED,
-                      int verbosity) 
+ofp_flow_stats_request(struct ds *string, const void *oh,
+                       size_t len OVS_UNUSED, int verbosity)
 {
     const struct ofp_flow_stats_request *fsr = oh;
 
@@ -990,7 +990,7 @@ ofp_flow_stats_reply(struct ds *string, const void *body_, size_t len,
 
 static void
 ofp_aggregate_stats_request(struct ds *string, const void *oh,
-                            size_t len UNUSED, int verbosity)
+                            size_t len OVS_UNUSED, int verbosity)
 {
     const struct ofp_aggregate_stats_request *asr = oh;
 
@@ -1005,7 +1005,7 @@ ofp_aggregate_stats_request(struct ds *string, const void *oh,
 
 static void
 ofp_aggregate_stats_reply(struct ds *string, const void *body_,
-                          size_t len UNUSED, int verbosity UNUSED)
+                          size_t len OVS_UNUSED, int verbosity OVS_UNUSED)
 {
     const struct ofp_aggregate_stats_reply *asr = body_;
 
@@ -1092,7 +1092,7 @@ ofp_table_stats_reply(struct ds *string, const void *body, size_t len,
 
 static void
 vendor_stat(struct ds *string, const void *body, size_t len,
-            int verbosity UNUSED)
+            int verbosity OVS_UNUSED)
 {
     ds_put_format(string, " vendor=%08"PRIx32, ntohl(*(uint32_t *) body));
     ds_put_format(string, " %zu bytes additional data",
index 4595c12cba74ec492944c895c7d43f0f12274587..2c33078f2bbf3f479041cc6b3a44347f6ab77f1a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -28,7 +28,7 @@ struct ofpbuf;
 
 #define ETH_ADDR_LEN           6
 
-static const uint8_t eth_addr_broadcast[ETH_ADDR_LEN] UNUSED
+static const uint8_t eth_addr_broadcast[ETH_ADDR_LEN] OVS_UNUSED
     = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
 
 static inline bool eth_addr_is_broadcast(const uint8_t ea[6])
index 1fe3c123506ccbcbec0bacbd15f550b02d67f59d..1f6b00fc99191a67ae50158a32cc6cc27b59d1c9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -55,7 +55,7 @@ static struct list all_processes = LIST_INITIALIZER(&all_processes);
 static bool sigchld_is_blocked(void);
 static void block_sigchld(sigset_t *);
 static void unblock_sigchld(const sigset_t *);
-static void sigchld_handler(int signr UNUSED);
+static void sigchld_handler(int signr OVS_UNUSED);
 static bool is_member(int x, const int *array, size_t);
 
 /* Initializes the process subsystem (if it is not already initialized).  Calls
@@ -595,7 +595,7 @@ process_run_capture(char **argv, char **stdout_log, char **stderr_log,
 }
 \f
 static void
-sigchld_handler(int signr UNUSED)
+sigchld_handler(int signr OVS_UNUSED)
 {
     struct process *p;
 
index 649db3be6880dc7f069e861e5e0ef1cafbbc0abb..d204a469f01e3859ecbeaad7c5560eaccbe2d8a1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -100,7 +100,7 @@ queue_pop_head(struct ovs_queue *q)
 
 /* Checks the internal integrity of 'q'.  For use in debugging. */
 static void
-check_queue(struct ovs_queue *q UNUSED)
+check_queue(struct ovs_queue *q OVS_UNUSED)
 {
 #if 0
     struct ofpbuf *iter;
index 35f42e44259bdf992eb933864555bc6f7b93d63f..771b3a30400812ccfeb9c23217be0c5332cf86b2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -313,13 +313,13 @@ rconn_destroy(struct rconn *rc)
 }
 
 static unsigned int
-timeout_VOID(const struct rconn *rc UNUSED)
+timeout_VOID(const struct rconn *rc OVS_UNUSED)
 {
     return UINT_MAX;
 }
 
 static void
-run_VOID(struct rconn *rc UNUSED)
+run_VOID(struct rconn *rc OVS_UNUSED)
 {
     /* Nothing to do. */
 }
index e6a6c70ef836b9a370bd9fffb64fc7cf3844b409..7c1975061ff01d8fd7703c726c07e69bcd5514f6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -204,7 +204,7 @@ make_sockaddr_un(const char *name, struct sockaddr_un* un, socklen_t *un_len)
  *
  * Returns the socket's fd if successful, otherwise a negative errno value. */
 int
-make_unix_socket(int style, bool nonblock, bool passcred UNUSED,
+make_unix_socket(int style, bool nonblock, bool passcred OVS_UNUSED,
                  const char *bind_path, const char *connect_path)
 {
     int error;
index 164a7db6e6b3fe601fe5efc12dff1e74505c6d80..43a174ccb657f19c2d77f3420ca485a3fc7f0157 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -76,7 +76,7 @@ static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 5);
 static struct shash commands = SHASH_INITIALIZER(&commands);
 
 static void
-unixctl_help(struct unixctl_conn *conn, const char *args UNUSED)
+unixctl_help(struct unixctl_conn *conn, const char *args OVS_UNUSED)
 {
     struct ds ds = DS_EMPTY_INITIALIZER;
     struct shash_node *node;
index 58c54f87772da00933b03888c5e747631a6b98c9..286c0aaae62724feff6e7245fafb31ecdf82bc78 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -158,7 +158,7 @@ static void ssl_clear_txbuf(struct ssl_vconn *);
 static int interpret_ssl_error(const char *function, int ret, int error,
                                int *want);
 static void ssl_tx_poll_callback(int fd, short int revents, void *vconn_);
-static DH *tmp_dh_callback(SSL *ssl, int is_export UNUSED, int keylength);
+static DH *tmp_dh_callback(SSL *ssl, int is_export OVS_UNUSED, int keylength);
 static void log_ca_cert(const char *file_name, X509 *cert);
 
 static short int
@@ -648,7 +648,8 @@ ssl_do_tx(struct vconn *vconn)
 }
 
 static void
-ssl_tx_poll_callback(int fd UNUSED, short int revents UNUSED, void *vconn_)
+ssl_tx_poll_callback(int fd OVS_UNUSED, short int revents OVS_UNUSED,
+                     void *vconn_)
 {
     struct vconn *vconn = vconn_;
     struct ssl_vconn *sslv = ssl_vconn_cast(vconn);
@@ -897,7 +898,7 @@ do_ssl_init(void)
 }
 
 static DH *
-tmp_dh_callback(SSL *ssl UNUSED, int is_export UNUSED, int keylength)
+tmp_dh_callback(SSL *ssl OVS_UNUSED, int is_export OVS_UNUSED, int keylength)
 {
     struct dh {
         int keylength;
index 0551c9ebf207245889208a99617b1b85cedb9c1c..243d381f720639b5ce51034f8dc150485279a707 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -174,7 +174,7 @@ stream_clear_txbuf(struct stream_vconn *s)
 }
 
 static void
-stream_do_tx(int fd UNUSED, short int revents UNUSED, void *vconn_)
+stream_do_tx(int fd OVS_UNUSED, short int revents OVS_UNUSED, void *vconn_)
 {
     struct vconn *vconn = vconn_;
     struct stream_vconn *s = stream_vconn_cast(vconn);
index aac716623de0ed09845c1cbf12d7c45014fbe3e8..906718d5bdaefa7c492d413d31ed6ea5f0641b62 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -100,7 +100,7 @@ static int ptcp_accept(int fd, const struct sockaddr *sa, size_t sa_len,
                        struct vconn **vconnp);
 
 static int
-ptcp_open(const char *name UNUSED, char *suffix, struct pvconn **pvconnp)
+ptcp_open(const char *name OVS_UNUSED, char *suffix, struct pvconn **pvconnp)
 {
     int fd;
 
index f24c84640b2a0bfbabc99cf58accc3d415ded6a0..d2b5a0f4060a831d53cd14cefc6d08683ed98849 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -80,7 +80,7 @@ static int punix_accept(int fd, const struct sockaddr *sa, size_t sa_len,
                         struct vconn **vconnp);
 
 static int
-punix_open(const char *name UNUSED, char *suffix, struct pvconn **pvconnp)
+punix_open(const char *name OVS_UNUSED, char *suffix, struct pvconn **pvconnp)
 {
     int fd, error;
 
index b11650fbc8b10f5a853bb49631f81d0d47b63ad3..f72dbe3ed675aee0227275e69137c9ef080ed885 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -119,7 +119,7 @@ check_vconn_classes(void)
  * connection methods supported by the vconn.  If 'bootstrap' is true, also
  * advertises options to bootstrap the CA certificate. */
 void
-vconn_usage(bool active, bool passive, bool bootstrap UNUSED)
+vconn_usage(bool active, bool passive, bool bootstrap OVS_UNUSED)
 {
     /* Really this should be implemented via callbacks into the vconn
      * providers, but that seems too heavy-weight to bother with at the
index 5496f010e6bfeea5e1d7152d4e0f4381c2845343..0fab00f14a4ab52182b15c7af48c7dd7c481cdb1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -393,7 +393,7 @@ vlog_unixctl_set(struct unixctl_conn *conn, const char *args)
 }
 
 static void
-vlog_unixctl_list(struct unixctl_conn *conn, const char *args UNUSED)
+vlog_unixctl_list(struct unixctl_conn *conn, const char *args OVS_UNUSED)
 {
     char *msg = vlog_get_levels();
     unixctl_command_reply(conn, 200, msg);
@@ -401,7 +401,7 @@ vlog_unixctl_list(struct unixctl_conn *conn, const char *args UNUSED)
 }
 
 static void
-vlog_unixctl_reopen(struct unixctl_conn *conn, const char *args UNUSED)
+vlog_unixctl_reopen(struct unixctl_conn *conn, const char *args OVS_UNUSED)
 {
     if (log_file_name) {
         int error = vlog_reopen_log_file();
index 2868db5a8599f4b895385b8ac8e0b59695497d99..372c3afe10cf117d13340761993e60a149c8ae24 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -244,7 +244,7 @@ discovery_wait(struct discovery *d)
 }
 
 static void
-modify_dhcp_request(struct dhcp_msg *msg, void *aux UNUSED)
+modify_dhcp_request(struct dhcp_msg *msg, void *aux OVS_UNUSED)
 {
     dhcp_msg_put_string(msg, DHCP_CODE_VENDOR_CLASS, "OpenFlow");
 }
index b78b0df09714bcf7f8026f490887d62d13c2f3b4..e72371a8d770416cf754879baed203df3349304d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -432,7 +432,7 @@ executer_rconn_closing(struct executer *e, struct rconn *rconn)
 }
 
 static void
-sigchld_handler(int signr UNUSED)
+sigchld_handler(int signr OVS_UNUSED)
 {
     write(signal_fds[1], "", 1);
 }
index b37db42d049c45fd49e0e3ffce677a770dfc0d71..45015ce7c57d0b3c5fe9ef47f1373635b1b2dffe 100644 (file)
@@ -96,14 +96,16 @@ ofproto_sflow_options_destroy(struct ofproto_sflow_options *options)
 
 /* sFlow library callback to allocate memory. */
 static void *
-sflow_agent_alloc_cb(void *magic UNUSED, SFLAgent *agent UNUSED, size_t bytes)
+sflow_agent_alloc_cb(void *magic OVS_UNUSED, SFLAgent *agent OVS_UNUSED,
+                     size_t bytes)
 {
     return calloc(1, bytes);
 }
 
 /* sFlow library callback to free memory. */
 static int
-sflow_agent_free_cb(void *magic UNUSED, SFLAgent *agent UNUSED, void *obj)
+sflow_agent_free_cb(void *magic OVS_UNUSED, SFLAgent *agent OVS_UNUSED,
+                    void *obj)
 {
     free(obj);
     return 0;
@@ -111,15 +113,16 @@ sflow_agent_free_cb(void *magic UNUSED, SFLAgent *agent UNUSED, void *obj)
 
 /* sFlow library callback to report error. */
 static void
-sflow_agent_error_cb(void *magic UNUSED, SFLAgent *agent UNUSED, char *msg)
+sflow_agent_error_cb(void *magic OVS_UNUSED, SFLAgent *agent OVS_UNUSED,
+                     char *msg)
 {
     VLOG_WARN("sFlow agent error: %s", msg);
 }
 
 /* sFlow library callback to send datagram. */
 static void
-sflow_agent_send_packet_cb(void *os_, SFLAgent *agent UNUSED,
-                           SFLReceiver *receiver UNUSED, u_char *pkt,
+sflow_agent_send_packet_cb(void *os_, SFLAgent *agent OVS_UNUSED,
+                           SFLReceiver *receiver OVS_UNUSED, u_char *pkt,
                            uint32_t pktLen)
 {
     struct ofproto_sflow *os = os_;
index 43054fa335e8465a80b528f18ec137fe9d9edd4e..69587c8cf9da0c9acbd762c41227cb9a9b783c3a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009 Nicira Networks.
+ * Copyright (c) 2009, 2010 Nicira Networks.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -617,7 +617,7 @@ ofproto_set_rate_limit(struct ofproto *ofproto,
 }
 
 int
-ofproto_set_stp(struct ofproto *ofproto UNUSED, bool enable_stp)
+ofproto_set_stp(struct ofproto *ofproto OVS_UNUSED, bool enable_stp)
 {
     /* XXX */
     if (enable_stp) {
index e4471c7b209528823c1336206e5fff3f4ec27757..f38d438fce404d061248ba8cdea807e421804275 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -95,7 +95,7 @@ release(void *cli_)
 }
 
 static void
-modify_dhcp_request(struct dhcp_msg *msg, void *aux UNUSED)
+modify_dhcp_request(struct dhcp_msg *msg, void *aux OVS_UNUSED)
 {
     if (vendor_class) {
         dhcp_msg_put_string(msg, DHCP_CODE_VENDOR_CLASS, vendor_class);
index 6e0b773670db02ef7597186d3e4f996f8fca5e00..451ca1ad0ea5f8e1c72d9a2ac8d118a32632845f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009 Nicira Networks.
+ * Copyright (c) 2009, 2010 Nicira Networks.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -31,7 +31,7 @@
 #include <assert.h>
 
 int
-main(int argc UNUSED, char *argv[])
+main(int argc OVS_UNUSED, char *argv[])
 {
     struct ofp_match expected_match;
     FILE *flows, *pcap;
index cf6ee1c9399a6b065ad74b7da18aefca4fa2d4ec..18d8f461db7187bc505cbfb31ebe8461ac7dce81 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -157,7 +157,7 @@ good_hash(int value)
 }
 
 static size_t
-constant_hash(int value UNUSED)
+constant_hash(int value OVS_UNUSED)
 {
     return 123;
 }
index 1bcd8c62f717539f8fa1ad5e0fa2d5d959588019..ff4d9ece35433194cbbb8209eb6208f316156062 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009 Nicira Networks.
+ * Copyright (c) 2009, 2010 Nicira Networks.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -346,7 +346,7 @@ test_send_invalid_version_hello(const char *type)
 }
 
 int
-main(int argc UNUSED, char *argv[])
+main(int argc OVS_UNUSED, char *argv[])
 {
     set_program_name(argv[0]);
     time_init();
index 1da026b02f624ec21eaef07c30647a762513f66a..d5e743f75206f418d19502e0e9977c8579bee3de 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009 Nicira Networks.
+ * Copyright (c) 2009, 2010 Nicira Networks.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -36,7 +36,7 @@ static const struct nl_policy rtnlgrp_link_policy[] = {
 };
 
 int
-main(int argc UNUSED, char *argv[])
+main(int argc OVS_UNUSED, char *argv[])
 {
     struct nl_sock *sock;
     int error;
index 2a7ba41dfb37c621f8b68a4c26a6cb45994c2029..b304878e11ab7cf8e76a5b3d84a3ae04ba545c26 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -60,7 +60,7 @@ static bool exit_without_bind;
 static bool exit_after_bind;
 
 static bool iface_init(struct iface *, const char *netdev_name);
-static void release_ifaces(void *aux UNUSED);
+static void release_ifaces(void *aux OVS_UNUSED);
 
 static void parse_options(int argc, char *argv[]);
 static void usage(void) NO_RETURN;
@@ -239,7 +239,7 @@ iface_init(struct iface *iface, const char *netdev_name)
 }
 
 static void
-release_ifaces(void *aux UNUSED)
+release_ifaces(void *aux OVS_UNUSED)
 {
     int i;
 
@@ -253,13 +253,13 @@ release_ifaces(void *aux UNUSED)
 }
 
 static void
-modify_dhcp_request(struct dhcp_msg *msg, void *aux UNUSED)
+modify_dhcp_request(struct dhcp_msg *msg, void *aux OVS_UNUSED)
 {
     dhcp_msg_put_string(msg, DHCP_CODE_VENDOR_CLASS, "OpenFlow");
 }
 
 static bool
-validate_dhcp_offer(const struct dhcp_msg *msg, void *aux UNUSED)
+validate_dhcp_offer(const struct dhcp_msg *msg, void *aux OVS_UNUSED)
 {
     static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(60, 60);
     char *vconn_name;
index 932aa893fef49e1ced25a03e3752e028fd5cd4bf..133dd401e3874e8bc817add29ce21034df30c6b4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -213,7 +213,7 @@ static int if_up(const char *netdev_name)
 }
 
 static void
-do_add_dp(int argc UNUSED, char *argv[])
+do_add_dp(int argc OVS_UNUSED, char *argv[])
 {
     struct dpif *dpif;
     run(dpif_create(argv[1], &dpif), "add_dp");
@@ -224,7 +224,7 @@ do_add_dp(int argc UNUSED, char *argv[])
 }
 
 static void
-do_del_dp(int argc UNUSED, char *argv[])
+do_del_dp(int argc OVS_UNUSED, char *argv[])
 {
     struct dpif *dpif;
     run(dpif_open(argv[1], &dpif), "opening datapath");
@@ -248,7 +248,7 @@ query_ports(struct dpif *dpif, struct odp_port **ports, size_t *n_ports)
 }
 
 static void
-do_add_if(int argc UNUSED, char *argv[])
+do_add_if(int argc OVS_UNUSED, char *argv[])
 {
     bool failure = false;
     struct dpif *dpif;
@@ -326,7 +326,7 @@ get_port_number(struct dpif *dpif, const char *name, uint16_t *port)
 }
 
 static void
-do_del_if(int argc UNUSED, char *argv[])
+do_del_if(int argc OVS_UNUSED, char *argv[])
 {
     bool failure = false;
     struct dpif *dpif;
@@ -435,7 +435,7 @@ do_show(int argc, char *argv[])
 }
 
 static void
-do_dump_dps(int argc UNUSED, char *argv[] UNUSED)
+do_dump_dps(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
 {
     struct svec all_dps;
     unsigned int i;
@@ -459,7 +459,7 @@ do_dump_dps(int argc UNUSED, char *argv[] UNUSED)
 }
 
 static void
-do_dump_flows(int argc UNUSED, char *argv[])
+do_dump_flows(int argc OVS_UNUSED, char *argv[])
 {
     struct odp_flow *flows;
     struct dpif *dpif;
@@ -489,7 +489,7 @@ do_dump_flows(int argc UNUSED, char *argv[])
 }
 
 static void
-do_del_flows(int argc UNUSED, char *argv[])
+do_del_flows(int argc OVS_UNUSED, char *argv[])
 {
     struct dpif *dpif;
 
@@ -499,7 +499,7 @@ do_del_flows(int argc UNUSED, char *argv[])
 }
 
 static void
-do_dump_groups(int argc UNUSED, char *argv[])
+do_dump_groups(int argc OVS_UNUSED, char *argv[])
 {
     struct odp_stats stats;
     struct dpif *dpif;
@@ -526,7 +526,7 @@ do_dump_groups(int argc UNUSED, char *argv[])
 }
 
 static void
-do_help(int argc UNUSED, char *argv[] UNUSED)
+do_help(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
 {
     usage();
 }
index 199bd43ec07061adac2934c99594857975c8e69d..c36a3bc81a656d493a70b7f5baf52823d519f83b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -372,14 +372,14 @@ dump_trivial_stats_transaction(const char *vconn_name, uint8_t stats_type)
 }
 
 static void
-do_show(const struct settings *s UNUSED, int argc UNUSED, char *argv[])
+do_show(const struct settings *s OVS_UNUSED, int argc OVS_UNUSED, char *argv[])
 {
     dump_trivial_transaction(argv[1], OFPT_FEATURES_REQUEST);
     dump_trivial_transaction(argv[1], OFPT_GET_CONFIG_REQUEST);
 }
 
 static void
-do_status(const struct settings *s UNUSED, int argc, char *argv[])
+do_status(const struct settings *s OVS_UNUSED, int argc, char *argv[])
 {
     struct nicira_header *request, *reply;
     struct vconn *vconn;
@@ -411,13 +411,15 @@ do_status(const struct settings *s UNUSED, int argc, char *argv[])
 }
 
 static void
-do_dump_desc(const struct settings *s UNUSED, int argc UNUSED, char *argv[])
+do_dump_desc(const struct settings *s OVS_UNUSED,
+             int argc OVS_UNUSED, char *argv[])
 {
     dump_trivial_stats_transaction(argv[1], OFPST_DESC);
 }
 
 static void
-do_dump_tables(const struct settings *s UNUSED, int argc UNUSED, char *argv[])
+do_dump_tables(const struct settings *s OVS_UNUSED,
+               int argc OVS_UNUSED, char *argv[])
 {
     dump_trivial_stats_transaction(argv[1], OFPST_TABLE);
 }
@@ -813,7 +815,7 @@ str_to_flow(char *string, struct ofp_match *match, struct ofpbuf *actions,
 }
 
 static void
-do_dump_flows(const struct settings *s UNUSED, int argc, char *argv[])
+do_dump_flows(const struct settings *s OVS_UNUSED, int argc, char *argv[])
 {
     struct ofp_flow_stats_request *req;
     uint16_t out_port;
@@ -829,7 +831,7 @@ do_dump_flows(const struct settings *s UNUSED, int argc, char *argv[])
 }
 
 static void
-do_dump_aggregate(const struct settings *s UNUSED, int argc, char *argv[])
+do_dump_aggregate(const struct settings *s OVS_UNUSED, int argc, char *argv[])
 {
     struct ofp_aggregate_stats_request *req;
     struct ofpbuf *request;
@@ -845,7 +847,8 @@ do_dump_aggregate(const struct settings *s UNUSED, int argc, char *argv[])
 }
 
 static void
-do_add_flow(const struct settings *s UNUSED, int argc UNUSED, char *argv[])
+do_add_flow(const struct settings *s OVS_UNUSED, int argc OVS_UNUSED,
+            char *argv[])
 {
     struct vconn *vconn;
     struct ofpbuf *buffer;
@@ -873,7 +876,8 @@ do_add_flow(const struct settings *s UNUSED, int argc UNUSED, char *argv[])
 }
 
 static void
-do_add_flows(const struct settings *s UNUSED, int argc UNUSED, char *argv[])
+do_add_flows(const struct settings *s OVS_UNUSED, int argc OVS_UNUSED,
+             char *argv[])
 {
     struct vconn *vconn;
     FILE *file;
@@ -926,7 +930,7 @@ do_add_flows(const struct settings *s UNUSED, int argc UNUSED, char *argv[])
 }
 
 static void
-do_mod_flows(const struct settings *s, int argc UNUSED, char *argv[])
+do_mod_flows(const struct settings *s, int argc OVS_UNUSED, char *argv[])
 {
     uint16_t priority, idle_timeout, hard_timeout;
     struct vconn *vconn;
@@ -987,7 +991,8 @@ static void do_del_flows(const struct settings *s, int argc, char *argv[])
 }
 
 static void
-do_monitor(const struct settings *s UNUSED, int argc UNUSED, char *argv[])
+do_monitor(const struct settings *s OVS_UNUSED,
+           int argc OVS_UNUSED, char *argv[])
 {
     struct vconn *vconn;
 
@@ -1012,13 +1017,15 @@ do_monitor(const struct settings *s UNUSED, int argc UNUSED, char *argv[])
 }
 
 static void
-do_dump_ports(const struct settings *s UNUSED, int argc UNUSED, char *argv[])
+do_dump_ports(const struct settings *s OVS_UNUSED,
+              int argc OVS_UNUSED, char *argv[])
 {
     dump_trivial_stats_transaction(argv[1], OFPST_PORT);
 }
 
 static void
-do_probe(const struct settings *s UNUSED, int argc UNUSED, char *argv[])
+do_probe(const struct settings *s OVS_UNUSED,
+         int argc OVS_UNUSED, char *argv[])
 {
     struct ofpbuf *request;
     struct vconn *vconn;
@@ -1035,7 +1042,8 @@ do_probe(const struct settings *s UNUSED, int argc UNUSED, char *argv[])
 }
 
 static void
-do_mod_port(const struct settings *s UNUSED, int argc UNUSED, char *argv[])
+do_mod_port(const struct settings *s OVS_UNUSED,
+            int argc OVS_UNUSED, char *argv[])
 {
     struct ofpbuf *request, *reply;
     struct ofp_switch_features *osf;
@@ -1115,7 +1123,7 @@ do_mod_port(const struct settings *s UNUSED, int argc UNUSED, char *argv[])
 }
 
 static void
-do_ping(const struct settings *s UNUSED, int argc, char *argv[])
+do_ping(const struct settings *s OVS_UNUSED, int argc, char *argv[])
 {
     size_t max_payload = 65535 - sizeof(struct ofp_header);
     unsigned int payload;
@@ -1162,7 +1170,8 @@ do_ping(const struct settings *s UNUSED, int argc, char *argv[])
 }
 
 static void
-do_benchmark(const struct settings *s UNUSED, int argc UNUSED, char *argv[])
+do_benchmark(const struct settings *s OVS_UNUSED,
+             int argc OVS_UNUSED, char *argv[])
 {
     size_t max_payload = 65535 - sizeof(struct ofp_header);
     struct timeval start, end;
@@ -1205,7 +1214,7 @@ do_benchmark(const struct settings *s UNUSED, int argc UNUSED, char *argv[])
 }
 
 static void
-do_execute(const struct settings *s UNUSED, int argc, char *argv[])
+do_execute(const struct settings *s OVS_UNUSED, int argc, char *argv[])
 {
     struct vconn *vconn;
     struct ofpbuf *request;
@@ -1270,7 +1279,8 @@ do_execute(const struct settings *s UNUSED, int argc, char *argv[])
 }
 
 static void
-do_help(const struct settings *s UNUSED, int argc UNUSED, char *argv[] UNUSED)
+do_help(const struct settings *s OVS_UNUSED,
+        int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
 {
     usage();
 }
index 3b7ec51f44fee1ae14326184d4d46b5e38143fe6..9152062b4c27a0a457488888cee0f06869b41e37 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2009 Nicira Networks
+/* Copyright (c) 2008, 2009, 2010 Nicira Networks
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -440,8 +440,8 @@ destroy_iface(const char *iface_name)
  * for 'iface', if it is not already open, and retrieves the interface's MAC
  * address and carrier status. */
 static bool
-init_iface_netdev(struct bridge *br UNUSED, struct iface *iface,
-                  void *aux UNUSED)
+init_iface_netdev(struct bridge *br OVS_UNUSED, struct iface *iface,
+                  void *aux OVS_UNUSED)
 {
     if (iface->netdev) {
         return true;
@@ -457,7 +457,8 @@ init_iface_netdev(struct bridge *br UNUSED, struct iface *iface,
 }
 
 static bool
-check_iface_dp_ifidx(struct bridge *br, struct iface *iface, void *aux UNUSED)
+check_iface_dp_ifidx(struct bridge *br, struct iface *iface,
+                     void *aux OVS_UNUSED)
 {
     if (iface->dp_ifidx >= 0) {
         VLOG_DBG("%s has interface %s on port %d",
@@ -472,8 +473,8 @@ check_iface_dp_ifidx(struct bridge *br, struct iface *iface, void *aux UNUSED)
 }
 
 static bool
-set_iface_properties(struct bridge *br UNUSED, struct iface *iface,
-                   void *aux UNUSED)
+set_iface_properties(struct bridge *br OVS_UNUSED, struct iface *iface,
+                     void *aux OVS_UNUSED)
 {
     int rate, burst;
 
@@ -1968,7 +1969,7 @@ compose_dsts(const struct bridge *br, const flow_t *flow, uint16_t vlan,
     return dst - dsts;
 }
 
-static void UNUSED
+static void OVS_UNUSED
 print_dsts(const struct dst *dsts, size_t n)
 {
     for (; n--; dsts++) {
@@ -2698,7 +2699,7 @@ bond_send_learning_packets(struct port *port)
 /* Bonding unixctl user interface functions. */
 
 static void
-bond_unixctl_list(struct unixctl_conn *conn, const char *args UNUSED)
+bond_unixctl_list(struct unixctl_conn *conn, const char *args OVS_UNUSED)
 {
     struct ds ds = DS_EMPTY_INITIALIZER;
     const struct bridge *br;
index 8da640fed263392493a2a998cffc93525c7cff7a..5a0e3fb6f51ee019cfffb2076f5099967389a47d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009 Nicira Networks
+/* Copyright (c) 2009, 2010 Nicira Networks
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -549,7 +549,7 @@ send_error_msg(uint32_t xid, uint16_t type, uint16_t code,
 }
 
 static int
-recv_echo_request(uint32_t xid UNUSED, const void *msg)
+recv_echo_request(uint32_t xid OVS_UNUSED, const void *msg)
 {
     const struct ofp_header *rq = msg;
     send_openflow_buffer(make_echo_reply(rq));
@@ -557,14 +557,14 @@ recv_echo_request(uint32_t xid UNUSED, const void *msg)
 }
 
 static int
-recv_features_request(uint32_t xid, const void *msg UNUSED)
+recv_features_request(uint32_t xid, const void *msg OVS_UNUSED)
 {
     send_features_reply(xid);
     return 0;
 }
 
 static int
-recv_set_config(uint32_t xid UNUSED, const void *msg UNUSED)
+recv_set_config(uint32_t xid OVS_UNUSED, const void *msg OVS_UNUSED)
 {
     /* Nothing to configure! */
     return 0;
@@ -593,8 +593,8 @@ recv_ofmp_capability_request(uint32_t xid, const struct ofmp_header *ofmph,
 }
 
 static int
-recv_ofmp_resources_request(uint32_t xid, const void *msg UNUSED, 
-        size_t len UNUSED)
+recv_ofmp_resources_request(uint32_t xid, const void *msg OVS_UNUSED, 
+        size_t len OVS_UNUSED)
 {
     send_resources_update(xid, true);
     return 0;
index 28491fc6c17f5a9d6261e6b4bf4672c09c4a8ee0..d98af469dc894ee4eb98077beb9a9add3c5fc62c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2009 Nicira Networks
+/* Copyright (c) 2008, 2009, 2010 Nicira Networks
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -122,7 +122,7 @@ main(int argc, char *argv[])
 }
 
 static void
-reload(struct unixctl_conn *conn, const char *args UNUSED)
+reload(struct unixctl_conn *conn, const char *args OVS_UNUSED)
 {
     need_reconfigure = true;
     conns = xrealloc(conns, sizeof *conns * (n_conns + 1));