From: Ben Pfaff Date: Thu, 8 Jan 2009 23:25:15 +0000 (-0800) Subject: Mark unused callback function parameters as UNUSED. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=411bebdc51f2ba6de76a6f04cd76a67436971258;p=openvswitch Mark unused callback function parameters as UNUSED. Found by -Wunused-parameters. --- diff --git a/lib/learning-switch.c b/lib/learning-switch.c index c53ff39e..b312cb32 100644 --- a/lib/learning-switch.c +++ b/lib/learning-switch.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2008 The Board of Trustees of The Leland Stanford +/* Copyright (c) 2008, 2009 The Board of Trustees of The Leland Stanford * Junior University * * We are making the OpenFlow specification and associated documentation @@ -497,7 +497,7 @@ process_port_status(struct lswitch *sw, struct rconn *rconn, void *ops_) } static void -process_phy_port(struct lswitch *sw, struct rconn *rconn, void *opp_) +process_phy_port(struct lswitch *sw, struct rconn *rconn UNUSED, void *opp_) { const struct ofp_phy_port *opp = opp_; uint16_t port_no = ntohs(opp->port_no); diff --git a/lib/ofp-print.c b/lib/ofp-print.c index f26770f6..d8d22b2b 100644 --- a/lib/ofp-print.c +++ b/lib/ofp-print.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2008 The Board of Trustees of The Leland Stanford +/* Copyright (c) 2008, 2009 The Board of Trustees of The Leland Stanford * Junior University * * We are making the OpenFlow specification and associated documentation @@ -597,7 +597,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) + int verbosity UNUSED) { const struct ofp_switch_features *osf = oh; struct ofp_phy_port *port_list; @@ -627,8 +627,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, - int verbosity) +ofp_print_switch_config(struct ds *string, const void *oh, size_t len UNUSED, + int verbosity UNUSED) { const struct ofp_switch_config *osc = oh; uint16_t flags; @@ -792,7 +792,7 @@ 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, +ofp_print_flow_expired(struct ds *string, const void *oh, size_t len UNUSED, int verbosity) { const struct ofp_flow_expired *ofe = oh; @@ -877,8 +877,8 @@ nx_print_msg(struct ds *string, const void *oh, size_t len, int verbosity) static void -ofp_print_port_mod(struct ds *string, const void *oh, size_t len, - int verbosity) +ofp_print_port_mod(struct ds *string, const void *oh, size_t len UNUSED, + int verbosity UNUSED) { const struct ofp_port_mod *opm = oh; @@ -953,7 +953,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) + int verbosity UNUSED) { const struct ofp_error_msg *oem = oh; int type = ntohs(oem->type); @@ -984,8 +984,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, - int verbosity) +ofp_print_port_status(struct ds *string, const void *oh, size_t len UNUSED, + int verbosity UNUSED) { const struct ofp_port_status *ops = oh; @@ -1001,8 +1001,8 @@ ofp_print_port_status(struct ds *string, const void *oh, size_t len, } static void -ofp_desc_stats_reply(struct ds *string, const void *body, size_t len, - int verbosity) +ofp_desc_stats_reply(struct ds *string, const void *body, size_t len UNUSED, + int verbosity UNUSED) { const struct ofp_desc_stats *ods = body; @@ -1013,7 +1013,7 @@ ofp_desc_stats_reply(struct ds *string, const void *body, size_t len, } static void -ofp_flow_stats_request(struct ds *string, const void *oh, size_t len, +ofp_flow_stats_request(struct ds *string, const void *oh, size_t len UNUSED, int verbosity) { const struct ofp_flow_stats_request *fsr = oh; @@ -1086,8 +1086,8 @@ 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, - int verbosity) +ofp_aggregate_stats_request(struct ds *string, const void *oh, + size_t len UNUSED, int verbosity) { const struct ofp_aggregate_stats_request *asr = oh; @@ -1101,8 +1101,8 @@ ofp_aggregate_stats_request(struct ds *string, const void *oh, size_t len, } static void -ofp_aggregate_stats_reply(struct ds *string, const void *body_, size_t len, - int verbosity) +ofp_aggregate_stats_reply(struct ds *string, const void *body_, + size_t len UNUSED, int verbosity UNUSED) { const struct ofp_aggregate_stats_reply *asr = body_; diff --git a/lib/rconn.c b/lib/rconn.c index 2051bc1a..f3dd6aa7 100644 --- a/lib/rconn.c +++ b/lib/rconn.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2008 The Board of Trustees of The Leland Stanford +/* Copyright (c) 2008, 2009 The Board of Trustees of The Leland Stanford * Junior University * * We are making the OpenFlow specification and associated documentation @@ -280,13 +280,13 @@ rconn_destroy(struct rconn *rc) } static unsigned int -timeout_VOID(const struct rconn *rc) +timeout_VOID(const struct rconn *rc UNUSED) { return UINT_MAX; } static void -run_VOID(struct rconn *rc) +run_VOID(struct rconn *rc UNUSED) { /* Nothing to do. */ } diff --git a/lib/vconn-ssl.c b/lib/vconn-ssl.c index 5dadc363..10354426 100644 --- a/lib/vconn-ssl.c +++ b/lib/vconn-ssl.c @@ -974,7 +974,7 @@ do_ssl_init(void) } static DH * -tmp_dh_callback(SSL *ssl, int is_export UNUSED, int keylength) +tmp_dh_callback(SSL *ssl UNUSED, int is_export UNUSED, int keylength) { struct dh { int keylength; diff --git a/lib/vconn-unix.c b/lib/vconn-unix.c index 48c27470..4fdb6ca9 100644 --- a/lib/vconn-unix.c +++ b/lib/vconn-unix.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2008 The Board of Trustees of The Leland Stanford +/* Copyright (c) 2008, 2009 The Board of Trustees of The Leland Stanford * Junior University * * We are making the OpenFlow specification and associated documentation @@ -96,7 +96,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, char *suffix, struct pvconn **pvconnp) +punix_open(const char *name UNUSED, char *suffix, struct pvconn **pvconnp) { int fd; @@ -128,5 +128,8 @@ punix_accept(int fd, const struct sockaddr *sa, size_t sa_len, struct pvconn_class punix_pvconn_class = { "punix", punix_open, + NULL, + NULL, + NULL }; diff --git a/lib/vlog-socket.c b/lib/vlog-socket.c index 0dc836f5..11bf2252 100644 --- a/lib/vlog-socket.c +++ b/lib/vlog-socket.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2008 The Board of Trustees of The Leland Stanford +/* Copyright (c) 2008, 2009 The Board of Trustees of The Leland Stanford * Junior University * * We are making the OpenFlow specification and associated documentation @@ -238,7 +238,7 @@ recv_with_creds(const struct vlog_server *server, /* Processes incoming requests for 'server'. */ static void -poll_server(int fd UNUSED, short int events, void *server_) +poll_server(int fd UNUSED, short int events UNUSED, void *server_) { struct vlog_server *server = server_; for (;;) { diff --git a/secchan/discovery.c b/secchan/discovery.c index 9ed51028..cb39a37d 100644 --- a/secchan/discovery.c +++ b/secchan/discovery.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2008 The Board of Trustees of The Leland Stanford +/* Copyright (c) 2008, 2009 The Board of Trustees of The Leland Stanford * Junior University * * We are making the OpenFlow specification and associated documentation @@ -224,7 +224,7 @@ discovery_wait(struct discovery *d) } static void -modify_dhcp_request(struct dhcp_msg *msg, void *aux) +modify_dhcp_request(struct dhcp_msg *msg, void *aux UNUSED) { dhcp_msg_put_string(msg, DHCP_CODE_VENDOR_CLASS, "OpenFlow"); } diff --git a/secchan/port-watcher.c b/secchan/port-watcher.c index 4b2514bc..dcc4e31c 100644 --- a/secchan/port-watcher.c +++ b/secchan/port-watcher.c @@ -383,7 +383,7 @@ static void log_port_status(uint16_t port_no, const struct ofp_phy_port *old, const struct ofp_phy_port *new, - void *aux) + void *aux UNUSED) { if (VLOG_IS_DBG_ENABLED()) { if (old && new && (opp_differs(old, new) diff --git a/secchan/snat.c b/secchan/snat.c index 17aa243d..b27372cb 100644 --- a/secchan/snat.c +++ b/secchan/snat.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2008 The Board of Trustees of The Leland Stanford +/* Copyright (c) 2008, 2009 The Board of Trustees of The Leland Stanford * Junior University * * We are making the OpenFlow specification and associated documentation @@ -243,7 +243,7 @@ snat_remote_packet_cb(struct relay *r, void *snat_) } static void -snat_port_changed_cb(uint16_t port_no, +snat_port_changed_cb(uint16_t port_no UNUSED, const struct ofp_phy_port *old, const struct ofp_phy_port *new, void *snat_) diff --git a/secchan/stp-secchan.c b/secchan/stp-secchan.c index a3ce5c73..917cea45 100644 --- a/secchan/stp-secchan.c +++ b/secchan/stp-secchan.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2008 The Board of Trustees of The Leland Stanford +/* Copyright (c) 2008, 2009 The Board of Trustees of The Leland Stanford * Junior University * * We are making the OpenFlow specification and associated documentation @@ -222,7 +222,7 @@ stp_is_port_supported(uint16_t port_no) static void stp_port_changed_cb(uint16_t port_no, - const struct ofp_phy_port *old, + const struct ofp_phy_port *old UNUSED, const struct ofp_phy_port *new, void *stp_) { diff --git a/tests/test-hmap.c b/tests/test-hmap.c index f4871e79..ee3289d1 100644 --- a/tests/test-hmap.c +++ b/tests/test-hmap.c @@ -142,7 +142,7 @@ good_hash(int value) } static size_t -constant_hash(int value) +constant_hash(int value UNUSED) { return 123; } diff --git a/udatapath/datapath.c b/udatapath/datapath.c index f5de7c5e..fdd4d5e9 100644 --- a/udatapath/datapath.c +++ b/udatapath/datapath.c @@ -931,7 +931,7 @@ void fwd_port_input(struct datapath *dp, struct ofpbuf *buffer, static int recv_features_request(struct datapath *dp, const struct sender *sender, - const void *msg) + const void *msg UNUSED) { dp_send_features_reply(dp, sender); return 0; @@ -939,7 +939,7 @@ recv_features_request(struct datapath *dp, const struct sender *sender, static int recv_get_config_request(struct datapath *dp, const struct sender *sender, - const void *msg) + const void *msg UNUSED) { struct ofpbuf *buffer; struct ofp_switch_config *osc; @@ -1167,8 +1167,9 @@ recv_flow(struct datapath *dp, const struct sender *sender, } } -static int desc_stats_dump(struct datapath *dp, void *state, - struct ofpbuf *buffer) +static int +desc_stats_dump(struct datapath *dp UNUSED, void *state UNUSED, + struct ofpbuf *buffer) { struct ofp_desc_stats *ods = ofpbuf_put_uninit(buffer, sizeof *ods); @@ -1304,8 +1305,9 @@ static void aggregate_stats_done(void *state) free(state); } -static int table_stats_dump(struct datapath *dp, void *state, - struct ofpbuf *buffer) +static int +table_stats_dump(struct datapath *dp, void *state UNUSED, + struct ofpbuf *buffer) { int i; for (i = 0; i < dp->chain->n_tables; i++) { @@ -1509,7 +1511,7 @@ stats_done(void *cb_) } static int -recv_stats_request(struct datapath *dp, const struct sender *sender, +recv_stats_request(struct datapath *dp UNUSED, const struct sender *sender, const void *oh) { const struct ofp_stats_request *rq = oh; diff --git a/udatapath/dp_act.c b/udatapath/dp_act.c index 3322d9fe..fc800f00 100644 --- a/udatapath/dp_act.c +++ b/udatapath/dp_act.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2008 The Board of Trustees of The Leland Stanford +/* Copyright (c) 2008, 2009 The Board of Trustees of The Leland Stanford * Junior University * * We are making the OpenFlow specification and associated documentation @@ -42,7 +42,7 @@ static uint16_t -validate_output(struct datapath *dp, const struct sw_flow_key *key, +validate_output(struct datapath *dp UNUSED, const struct sw_flow_key *key, const struct ofp_action_header *ah) { struct ofp_action_output *oa = (struct ofp_action_output *)ah; @@ -142,14 +142,14 @@ set_vlan_pcp(struct ofpbuf *buffer, struct sw_flow_key *key, static void strip_vlan(struct ofpbuf *buffer, struct sw_flow_key *key, - const struct ofp_action_header *ah) + const struct ofp_action_header *ah UNUSED) { vlan_pull_tag(buffer); key->flow.dl_vlan = htons(OFP_VLAN_NONE); } static void -set_dl_addr(struct ofpbuf *buffer, struct sw_flow_key *key, +set_dl_addr(struct ofpbuf *buffer, struct sw_flow_key *key UNUSED, const struct ofp_action_header *ah) { struct ofp_action_dl_addr *da = (struct ofp_action_dl_addr *)ah; diff --git a/udatapath/nx_act.c b/udatapath/nx_act.c index e2a6d4f6..6ece0c9c 100644 --- a/udatapath/nx_act.c +++ b/udatapath/nx_act.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2008 The Board of Trustees of The Leland Stanford +/* Copyright (c) 2008, 2009 The Board of Trustees of The Leland Stanford * Junior University * * We are making the OpenFlow specification and associated documentation @@ -36,16 +36,19 @@ #include "nx_act.h" uint16_t -nx_validate_act(struct datapath *dp, const struct sw_flow_key *key, - const struct ofp_action_vendor_header *avh, uint16_t len) +nx_validate_act(struct datapath *dp UNUSED, + const struct sw_flow_key *key UNUSED, + const struct ofp_action_vendor_header *avh UNUSED, + uint16_t len UNUSED) { /* Nothing to validate yet */ return OFPBAC_BAD_VENDOR_TYPE; } void -nx_execute_act(struct ofpbuf *buffer, const struct sw_flow_key *key, - const struct ofp_action_vendor_header *avh) +nx_execute_act(struct ofpbuf *buffer UNUSED, + const struct sw_flow_key *key UNUSED, + const struct ofp_action_vendor_header *avh UNUSED) { /* Nothing to execute yet */ } diff --git a/udatapath/table-hash.c b/udatapath/table-hash.c index fd1ec8a7..f713df5f 100644 --- a/udatapath/table-hash.c +++ b/udatapath/table-hash.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2008 The Board of Trustees of The Leland Stanford +/* Copyright (c) 2008, 2009 The Board of Trustees of The Leland Stanford * Junior University * * We are making the OpenFlow specification and associated documentation @@ -132,13 +132,13 @@ do_delete(struct sw_flow **bucket) *bucket = NULL; } -/* Returns number of deleted flows. We can igonre the priority +/* Returns number of deleted flows. We ignore the priority * argument, since all exact-match entries are the same (highest) * priority. */ static int table_hash_delete(struct datapath *dp, struct sw_table *swt, const struct sw_flow_key *key, uint16_t out_port, - uint16_t priority, int strict) + uint16_t priority UNUSED, int strict) { struct sw_table_hash *th = (struct sw_table_hash *) swt; unsigned int count = 0; diff --git a/utilities/dpctl.c b/utilities/dpctl.c index 1bc2647b..f9d581c2 100644 --- a/utilities/dpctl.c +++ b/utilities/dpctl.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2008 The Board of Trustees of The Leland Stanford +/* Copyright (c) 2008, 2009 The Board of Trustees of The Leland Stanford * Junior University * * We are making the OpenFlow specification and associated documentation @@ -289,7 +289,7 @@ static int if_up(const char *netdev_name) } static void -do_get_idx(const struct settings *s, int argc UNUSED, char *argv[]) +do_get_idx(const struct settings *s UNUSED, int argc UNUSED, char *argv[]) { int dp_idx; @@ -316,7 +316,7 @@ get_dp_idx(const char *name) } static void -do_add_dp(const struct settings *s, int argc UNUSED, char *argv[]) +do_add_dp(const struct settings *s UNUSED, int argc UNUSED, char *argv[]) { struct dpif dpif; run(dpif_open(-1, &dpif), "opening management socket"); @@ -325,7 +325,7 @@ do_add_dp(const struct settings *s, int argc UNUSED, char *argv[]) } static void -do_del_dp(const struct settings *s, int argc UNUSED, char *argv[]) +do_del_dp(const struct settings *s UNUSED, int argc UNUSED, char *argv[]) { struct dpif dpif; run(dpif_open(-1, &dpif), "opening management socket"); @@ -365,13 +365,13 @@ static int ifup_and_add_port(struct dpif *dpif, int dp_idx, const char *netdev) return retval ? retval : dpif_add_port(dpif, dp_idx, netdev); } -static void do_add_port(const struct settings *s, int argc UNUSED, +static void do_add_port(const struct settings *s UNUSED, int argc UNUSED, char *argv[]) { add_del_ports(argc, argv, ifup_and_add_port, "add", "to"); } -static void do_del_port(const struct settings *s, int argc UNUSED, +static void do_del_port(const struct settings *s UNUSED, int argc UNUSED, char *argv[]) { add_del_ports(argc, argv, dpif_del_port, "remove", "from"); @@ -465,14 +465,14 @@ dump_trivial_stats_transaction(const char *vconn_name, uint8_t stats_type) } static void -do_show(const struct settings *s, int argc UNUSED, char *argv[]) +do_show(const struct settings *s UNUSED, int argc 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, int argc, char *argv[]) +do_status(const struct settings *s UNUSED, int argc, char *argv[]) { struct nicira_header *request, *reply; struct vconn *vconn; @@ -503,13 +503,13 @@ do_status(const struct settings *s, int argc, char *argv[]) } static void -do_dump_desc(const struct settings *s, int argc, char *argv[]) +do_dump_desc(const struct settings *s UNUSED, int argc UNUSED, char *argv[]) { dump_trivial_stats_transaction(argv[1], OFPST_DESC); } static void -do_dump_tables(const struct settings *s, int argc, char *argv[]) +do_dump_tables(const struct settings *s UNUSED, int argc UNUSED, char *argv[]) { dump_trivial_stats_transaction(argv[1], OFPST_TABLE); } @@ -879,7 +879,8 @@ str_to_flow(char *string, struct ofp_match *match, match->wildcards = htonl(wildcards); } -static void do_dump_flows(const struct settings *s, int argc, char *argv[]) +static void +do_dump_flows(const struct settings *s UNUSED, int argc, char *argv[]) { struct ofp_flow_stats_request *req; uint16_t out_port; @@ -894,8 +895,8 @@ static void do_dump_flows(const struct settings *s, int argc, char *argv[]) dump_stats_transaction(argv[1], request); } -static void do_dump_aggregate(const struct settings *s, int argc, - char *argv[]) +static void +do_dump_aggregate(const struct settings *s UNUSED, int argc, char *argv[]) { struct ofp_aggregate_stats_request *req; struct ofpbuf *request; @@ -911,7 +912,8 @@ static void do_dump_aggregate(const struct settings *s, int argc, } #ifdef SUPPORT_SNAT -static void do_add_snat(const struct settings *s, int argc, char *argv[]) +static void +do_add_snat(const struct settings *s UNUSED, int argc UNUSED, char *argv[]) { struct vconn *vconn; struct ofpbuf *buffer; @@ -937,7 +939,8 @@ static void do_add_snat(const struct settings *s, int argc, char *argv[]) vconn_close(vconn); } -static void do_del_snat(const struct settings *s, int argc, char *argv[]) +static void +do_del_snat(const struct settings *s UNUSED, int argc UNUSED, char *argv[]) { struct vconn *vconn; struct ofpbuf *buffer; @@ -962,7 +965,8 @@ static void do_del_snat(const struct settings *s, int argc, char *argv[]) } #endif /* SUPPORT_SNAT */ -static void do_add_flow(const struct settings *s, int argc, char *argv[]) +static void +do_add_flow(const struct settings *s UNUSED, int argc UNUSED, char *argv[]) { struct vconn *vconn; struct ofpbuf *buffer; @@ -991,7 +995,8 @@ static void do_add_flow(const struct settings *s, int argc, char *argv[]) vconn_close(vconn); } -static void do_add_flows(const struct settings *s, int argc, char *argv[]) +static void +do_add_flows(const struct settings *s UNUSED, int argc UNUSED, char *argv[]) { struct vconn *vconn; FILE *file; @@ -1044,7 +1049,8 @@ static void do_add_flows(const struct settings *s, int argc, char *argv[]) fclose(file); } -static void do_mod_flows(const struct settings *s, int argc, char *argv[]) +static void +do_mod_flows(const struct settings *s, int argc UNUSED, char *argv[]) { uint16_t priority, idle_timeout, hard_timeout; struct vconn *vconn; @@ -1109,7 +1115,7 @@ static void do_del_flows(const struct settings *s, int argc, char *argv[]) } static void -do_monitor(const struct settings *s, int argc UNUSED, char *argv[]) +do_monitor(const struct settings *s UNUSED, int argc UNUSED, char *argv[]) { struct vconn *vconn; const char *name; @@ -1132,13 +1138,13 @@ do_monitor(const struct settings *s, int argc UNUSED, char *argv[]) } static void -do_dump_ports(const struct settings *s, int argc, char *argv[]) +do_dump_ports(const struct settings *s UNUSED, int argc UNUSED, char *argv[]) { dump_trivial_stats_transaction(argv[1], OFPST_PORT); } static void -do_probe(const struct settings *s, int argc, char *argv[]) +do_probe(const struct settings *s UNUSED, int argc UNUSED, char *argv[]) { struct ofpbuf *request; struct vconn *vconn; @@ -1155,7 +1161,7 @@ do_probe(const struct settings *s, int argc, char *argv[]) } static void -do_mod_port(const struct settings *s, int argc, char *argv[]) +do_mod_port(const struct settings *s UNUSED, int argc UNUSED, char *argv[]) { struct ofpbuf *request, *reply; struct ofp_switch_features *osf; @@ -1235,7 +1241,7 @@ do_mod_port(const struct settings *s, int argc, char *argv[]) } static void -do_ping(const struct settings *s, int argc, char *argv[]) +do_ping(const struct settings *s UNUSED, int argc, char *argv[]) { size_t max_payload = 65535 - sizeof(struct ofp_header); unsigned int payload; @@ -1282,7 +1288,7 @@ do_ping(const struct settings *s, int argc, char *argv[]) } static void -do_benchmark(const struct settings *s, int argc, char *argv[]) +do_benchmark(const struct settings *s UNUSED, int argc UNUSED, char *argv[]) { size_t max_payload = 65535 - sizeof(struct ofp_header); struct timeval start, end; @@ -1325,7 +1331,7 @@ do_benchmark(const struct settings *s, int argc, char *argv[]) } static void -do_execute(const struct settings *s, int argc, char *argv[]) +do_execute(const struct settings *s UNUSED, int argc, char *argv[]) { struct vconn *vconn; struct ofpbuf *request; @@ -1389,8 +1395,8 @@ do_execute(const struct settings *s, int argc, char *argv[]) } } -static void do_help(const struct settings *s, int argc UNUSED, - char *argv[] UNUSED) +static void +do_help(const struct settings *s UNUSED, int argc UNUSED, char *argv[] UNUSED) { usage(); } diff --git a/utilities/ofp-discover.c b/utilities/ofp-discover.c index 461aa7ca..55f40429 100644 --- a/utilities/ofp-discover.c +++ b/utilities/ofp-discover.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2008 The Board of Trustees of The Leland Stanford +/* Copyright (c) 2008, 2009 The Board of Trustees of The Leland Stanford * Junior University * * We are making the OpenFlow specification and associated documentation @@ -267,13 +267,13 @@ release_ifaces(void *aux UNUSED) } static void -modify_dhcp_request(struct dhcp_msg *msg, void *aux) +modify_dhcp_request(struct dhcp_msg *msg, void *aux UNUSED) { dhcp_msg_put_string(msg, DHCP_CODE_VENDOR_CLASS, "OpenFlow"); } static bool -validate_dhcp_offer(const struct dhcp_msg *msg, void *aux) +validate_dhcp_offer(const struct dhcp_msg *msg, void *aux UNUSED) { static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(60, 60); char *vconn_name;