From 67a4917b07031b387beafaedce413b4207214059 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 11 Feb 2010 10:59:47 -0800 Subject: [PATCH] Rename UNUSED macro to OVS_UNUSED to avoid naming conflict. Requested by Jean Tourrilhes . --- extras/ezio/ovs-switchui.c | 16 ++++++------- extras/ezio/terminal.c | 4 ++-- extras/ezio/tty.c | 6 +++-- lib/backtrace.c | 4 ++-- lib/compiler.h | 4 ++-- lib/coverage.c | 4 ++-- lib/dhcp-client.c | 4 ++-- lib/dpif-linux.c | 2 +- lib/dpif-netdev.c | 6 ++--- lib/fatal-signal.c | 4 ++-- lib/leak-checker.c | 14 ++++++------ lib/learning-switch.c | 5 +++-- lib/netdev-linux.c | 8 +++---- lib/netdev.c | 4 ++-- lib/ofp-print.c | 38 +++++++++++++++---------------- lib/packets.h | 4 ++-- lib/process.c | 6 ++--- lib/queue.c | 4 ++-- lib/rconn.c | 6 ++--- lib/socket-util.c | 4 ++-- lib/unixctl.c | 4 ++-- lib/vconn-ssl.c | 9 ++++---- lib/vconn-stream.c | 4 ++-- lib/vconn-tcp.c | 4 ++-- lib/vconn-unix.c | 4 ++-- lib/vconn.c | 4 ++-- lib/vlog.c | 6 ++--- ofproto/discovery.c | 4 ++-- ofproto/executer.c | 4 ++-- ofproto/ofproto-sflow.c | 13 ++++++----- ofproto/ofproto.c | 4 ++-- tests/test-dhcp-client.c | 4 ++-- tests/test-flows.c | 4 ++-- tests/test-hmap.c | 4 ++-- tests/test-vconn.c | 4 ++-- utilities/nlmon.c | 4 ++-- utilities/ovs-discover.c | 10 ++++----- utilities/ovs-dpctl.c | 20 ++++++++--------- utilities/ovs-ofctl.c | 46 +++++++++++++++++++++++--------------- vswitchd/bridge.c | 17 +++++++------- vswitchd/mgmt.c | 12 +++++----- vswitchd/ovs-vswitchd.c | 4 ++-- 42 files changed, 177 insertions(+), 159 deletions(-) diff --git a/extras/ezio/ovs-switchui.c b/extras/ezio/ovs-switchui.c index cd1f3521..e087aa00 100644 --- a/extras/ezio/ovs-switchui.c +++ b/extras/ezio/ovs-switchui.c @@ -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"; diff --git a/extras/ezio/terminal.c b/extras/ezio/terminal.c index e41a987d..090e80e4 100644 --- a/extras/ezio/terminal.c +++ b/extras/ezio/terminal.c @@ -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); } diff --git a/extras/ezio/tty.c b/extras/ezio/tty.c index 709b8028..fefeea15 100644 --- a/extras/ezio/tty.c +++ b/extras/ezio/tty.c @@ -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; diff --git a/lib/backtrace.c b/lib/backtrace.c index 2f478093..80cae54a 100644 --- a/lib/backtrace.c +++ b/lib/backtrace.c @@ -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"; diff --git a/lib/compiler.h b/lib/compiler.h index 17e245fc..0075ca87 100644 --- a/lib/compiler.h +++ b/lib/compiler.h @@ -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))) diff --git a/lib/coverage.c b/lib/coverage.c index cdc796ec..92bc2b89 100644 --- a/lib/coverage.c +++ b/lib/coverage.c @@ -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); diff --git a/lib/dhcp-client.c b/lib/dhcp-client.c index 4f907813..bb331288 100644 --- a/lib/dhcp-client.c +++ b/lib/dhcp-client.c @@ -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. */ } diff --git a/lib/dpif-linux.c b/lib/dpif-linux.c index e7d43811..3920d462 100644 --- a/lib/dpif-linux.c +++ b/lib/dpif-linux.c @@ -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; diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 720e8cb0..e9f006c3 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -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) { diff --git a/lib/fatal-signal.c b/lib/fatal-signal.c index 81805214..9aa50e42 100644 --- a/lib/fatal-signal.c +++ b/lib/fatal-signal.c @@ -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(); } diff --git a/lib/leak-checker.c b/lib/leak-checker.c index 8d256bc8..4ab55e59 100644 --- a/lib/leak-checker.c +++ b/lib/leak-checker.c @@ -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. @@ -24,19 +24,19 @@ #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; diff --git a/lib/learning-switch.c b/lib/learning-switch.c index ecfa87f6..8ace3ba2 100644 --- a/lib/learning-switch.c +++ b/lib/learning-switch.c @@ -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); diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c index 61994c2f..95501b08 100644 --- a/lib/netdev-linux.c +++ b/lib/netdev-linux.c @@ -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, diff --git a/lib/netdev.c b/lib/netdev.c index f1eb29b5..82a49041 100644 --- a/lib/netdev.c +++ b/lib/netdev.c @@ -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) { diff --git a/lib/ofp-print.c b/lib/ofp-print.c index 9c1afe44..e2271299 100644 --- a/lib/ofp-print.c +++ b/lib/ofp-print.c @@ -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", diff --git a/lib/packets.h b/lib/packets.h index 4595c12c..2c33078f 100644 --- a/lib/packets.h +++ b/lib/packets.h @@ -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]) diff --git a/lib/process.c b/lib/process.c index 1fe3c123..1f6b00fc 100644 --- a/lib/process.c +++ b/lib/process.c @@ -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, } static void -sigchld_handler(int signr UNUSED) +sigchld_handler(int signr OVS_UNUSED) { struct process *p; diff --git a/lib/queue.c b/lib/queue.c index 649db3be..d204a469 100644 --- a/lib/queue.c +++ b/lib/queue.c @@ -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; diff --git a/lib/rconn.c b/lib/rconn.c index 35f42e44..771b3a30 100644 --- a/lib/rconn.c +++ b/lib/rconn.c @@ -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. */ } diff --git a/lib/socket-util.c b/lib/socket-util.c index e6a6c70e..7c197506 100644 --- a/lib/socket-util.c +++ b/lib/socket-util.c @@ -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; diff --git a/lib/unixctl.c b/lib/unixctl.c index 164a7db6..43a174cc 100644 --- a/lib/unixctl.c +++ b/lib/unixctl.c @@ -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; diff --git a/lib/vconn-ssl.c b/lib/vconn-ssl.c index 58c54f87..286c0aaa 100644 --- a/lib/vconn-ssl.c +++ b/lib/vconn-ssl.c @@ -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; diff --git a/lib/vconn-stream.c b/lib/vconn-stream.c index 0551c9eb..243d381f 100644 --- a/lib/vconn-stream.c +++ b/lib/vconn-stream.c @@ -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); diff --git a/lib/vconn-tcp.c b/lib/vconn-tcp.c index aac71662..906718d5 100644 --- a/lib/vconn-tcp.c +++ b/lib/vconn-tcp.c @@ -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; diff --git a/lib/vconn-unix.c b/lib/vconn-unix.c index f24c8464..d2b5a0f4 100644 --- a/lib/vconn-unix.c +++ b/lib/vconn-unix.c @@ -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; diff --git a/lib/vconn.c b/lib/vconn.c index b11650fb..f72dbe3e 100644 --- a/lib/vconn.c +++ b/lib/vconn.c @@ -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 diff --git a/lib/vlog.c b/lib/vlog.c index 5496f010..0fab00f1 100644 --- a/lib/vlog.c +++ b/lib/vlog.c @@ -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(); diff --git a/ofproto/discovery.c b/ofproto/discovery.c index 2868db5a..372c3afe 100644 --- a/ofproto/discovery.c +++ b/ofproto/discovery.c @@ -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"); } diff --git a/ofproto/executer.c b/ofproto/executer.c index b78b0df0..e72371a8 100644 --- a/ofproto/executer.c +++ b/ofproto/executer.c @@ -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); } diff --git a/ofproto/ofproto-sflow.c b/ofproto/ofproto-sflow.c index b37db42d..45015ce7 100644 --- a/ofproto/ofproto-sflow.c +++ b/ofproto/ofproto-sflow.c @@ -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_; diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 43054fa3..69587c8c 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -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) { diff --git a/tests/test-dhcp-client.c b/tests/test-dhcp-client.c index e4471c7b..f38d438f 100644 --- a/tests/test-dhcp-client.c +++ b/tests/test-dhcp-client.c @@ -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); diff --git a/tests/test-flows.c b/tests/test-flows.c index 6e0b7736..451ca1ad 100644 --- a/tests/test-flows.c +++ b/tests/test-flows.c @@ -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 int -main(int argc UNUSED, char *argv[]) +main(int argc OVS_UNUSED, char *argv[]) { struct ofp_match expected_match; FILE *flows, *pcap; diff --git a/tests/test-hmap.c b/tests/test-hmap.c index cf6ee1c9..18d8f461 100644 --- a/tests/test-hmap.c +++ b/tests/test-hmap.c @@ -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; } diff --git a/tests/test-vconn.c b/tests/test-vconn.c index 1bcd8c62..ff4d9ece 100644 --- a/tests/test-vconn.c +++ b/tests/test-vconn.c @@ -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(); diff --git a/utilities/nlmon.c b/utilities/nlmon.c index 1da026b0..d5e743f7 100644 --- a/utilities/nlmon.c +++ b/utilities/nlmon.c @@ -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; diff --git a/utilities/ovs-discover.c b/utilities/ovs-discover.c index 2a7ba41d..b304878e 100644 --- a/utilities/ovs-discover.c +++ b/utilities/ovs-discover.c @@ -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; diff --git a/utilities/ovs-dpctl.c b/utilities/ovs-dpctl.c index 932aa893..133dd401 100644 --- a/utilities/ovs-dpctl.c +++ b/utilities/ovs-dpctl.c @@ -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(); } diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c index 199bd43e..c36a3bc8 100644 --- a/utilities/ovs-ofctl.c +++ b/utilities/ovs-ofctl.c @@ -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(); } diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 3b7ec51f..9152062b 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -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; diff --git a/vswitchd/mgmt.c b/vswitchd/mgmt.c index 8da640fe..5a0e3fb6 100644 --- a/vswitchd/mgmt.c +++ b/vswitchd/mgmt.c @@ -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; diff --git a/vswitchd/ovs-vswitchd.c b/vswitchd/ovs-vswitchd.c index 28491fc6..d98af469 100644 --- a/vswitchd/ovs-vswitchd.c +++ b/vswitchd/ovs-vswitchd.c @@ -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)); -- 2.30.2