diff options
author | Ben Pfaff <blp@nicira.com> | 2014-07-14 14:29:20 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2014-07-15 09:39:21 -0700 |
commit | a3358085b8a15d6a5142ec361c6f203e92dd436e (patch) | |
tree | 390fa21c361d350e6a610d14b562694d42e1b150 | |
parent | e7dcae61f65f58efb5b56eaff161d7518328d64e (diff) | |
download | openvswitch-a3358085b8a15d6a5142ec361c6f203e92dd436e.tar.gz |
Drop assignments whose values are never used.
Found by clang-analyzer.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
-rw-r--r-- | lib/ofp-actions.c | 6 | ||||
-rw-r--r-- | lib/ofp-parse.c | 6 | ||||
-rw-r--r-- | lib/ofp-util.c | 2 | ||||
-rw-r--r-- | ofproto/ofproto.c | 1 |
4 files changed, 7 insertions, 8 deletions
diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c index 984977125..e8fd92227 100644 --- a/lib/ofp-actions.c +++ b/lib/ofp-actions.c @@ -1810,8 +1810,8 @@ ofpacts_pull_openflow_instructions(struct ofpbuf *openflow, ofpact_pad(ofpacts); start = ofpbuf_size(ofpacts); - on = ofpact_put(ofpacts, OFPACT_WRITE_ACTIONS, - offsetof(struct ofpact_nest, actions)); + ofpact_put(ofpacts, OFPACT_WRITE_ACTIONS, + offsetof(struct ofpact_nest, actions)); get_actions_from_instruction(insts[OVSINST_OFPIT11_WRITE_ACTIONS], &actions, &max_actions); error = ofpacts_from_openflow11_for_action_set(actions, max_actions, @@ -2288,7 +2288,7 @@ ofpact_note_to_nxast(const struct ofpact_note *note, struct ofpbuf *out) unsigned int remainder; unsigned int len; - nan = ofputil_put_NXAST_NOTE(out); + ofputil_put_NXAST_NOTE(out); ofpbuf_set_size(out, ofpbuf_size(out) - sizeof nan->note); ofpbuf_put(out, note->data, note->length); diff --git a/lib/ofp-parse.c b/lib/ofp-parse.c index ff7b9ce6e..f0a30cf7b 100644 --- a/lib/ofp-parse.c +++ b/lib/ofp-parse.c @@ -398,7 +398,7 @@ parse_noargs_dec_ttl(struct ofpbuf *b) struct ofpact_cnt_ids *ids; uint16_t id = 0; - ids = ofpact_put_DEC_TTL(b); + ofpact_put_DEC_TTL(b); ofpbuf_put(b, &id, sizeof id); ids = b->frame; ids->n_controllers++; @@ -1051,8 +1051,8 @@ parse_named_instruction(enum ovs_instruction_type type, ofpact_pad(ofpacts); ofs = ofpbuf_size(ofpacts); - on = ofpact_put(ofpacts, OFPACT_WRITE_ACTIONS, - offsetof(struct ofpact_nest, actions)); + ofpact_put(ofpacts, OFPACT_WRITE_ACTIONS, + offsetof(struct ofpact_nest, actions)); error_s = str_to_ofpacts__(arg, ofpacts, usable_protocols); on = ofpbuf_at_assert(ofpacts, ofs, sizeof *on); diff --git a/lib/ofp-util.c b/lib/ofp-util.c index a4ee2c298..912def928 100644 --- a/lib/ofp-util.c +++ b/lib/ofp-util.c @@ -3207,7 +3207,7 @@ ofputil_encode_flow_removed(const struct ofputil_flow_removed *fr, msg = ofpraw_alloc_xid(OFPRAW_NXT_FLOW_REMOVED, OFP10_VERSION, htonl(0), NXM_TYPICAL_LEN); - nfr = ofpbuf_put_zeros(msg, sizeof *nfr); + ofpbuf_put_zeros(msg, sizeof *nfr); match_len = nx_put_match(msg, &fr->match, 0, 0); nfr = ofpbuf_l3(msg); diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 6d0c60884..c9a800092 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -4856,7 +4856,6 @@ handle_flow_monitor_request(struct ofconn *ofconn, const struct ofp_header *oh) struct ofpbuf b; size_t i; - error = 0; ofpbuf_use_const(&b, oh, ntohs(oh->length)); monitors = NULL; n_monitors = allocated_monitors = 0; |