Found by -Wunused-parameters.
-/* 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
}
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);
-/* 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
* '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;
/* 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;
/* 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;
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;
* 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);
/* 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;
}
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;
}
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;
}
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;
}
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_;
-/* 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
}
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. */
}
}
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;
-/* 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
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;
struct pvconn_class punix_pvconn_class = {
"punix",
punix_open,
+ NULL,
+ NULL,
+ NULL
};
-/* 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
/* 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 (;;) {
-/* 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
}
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");
}
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)
-/* 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
}
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_)
-/* 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
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_)
{
}
static size_t
-constant_hash(int value)
+constant_hash(int value UNUSED)
{
return 123;
}
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;
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;
}
}
-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);
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++) {
}
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;
-/* 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
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;
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;
-/* 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
#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 */
}
-/* 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
*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;
-/* 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
}
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;
}
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");
}
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");
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");
}
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;
}
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);
}
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;
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;
}
#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;
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;
}
#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;
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;
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
}
-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();
}
-/* 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
}
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;