On 10/17/23 15:49, Eelco Chaudron wrote: > This patch fixes two 'Dead assignment' warnings, where the one in > count_common_prefix_run() is actually a bug where the set is in reverse order. > > Signed-off-by: Eelco Chaudron <echau...@redhat.com> > --- > lib/ofp-monitor.c | 5 ++--- > lib/ofp-table.c | 2 +- > 2 files changed, 3 insertions(+), 4 deletions(-) > > diff --git a/lib/ofp-monitor.c b/lib/ofp-monitor.c > index c27733a52..aed5f0497 100644 > --- a/lib/ofp-monitor.c > +++ b/lib/ofp-monitor.c > @@ -962,13 +962,12 @@ ofputil_decode_flow_update(struct ofputil_flow_update > *update, > return 0; > } else if (update->event == OFPFME_PAUSED > || update->event == OFPFME_RESUMED) { > - struct ofp_flow_update_paused *ofup; > > - if (length != sizeof *ofup) { > + if (length != sizeof(struct ofp_flow_update_paused)) { > goto bad_len; > } > > - ofup = ofpbuf_pull(msg, sizeof *ofup); > + ofpbuf_pull(msg, sizeof(struct ofp_flow_update_paused));
Hmm. I find the previous code a little bit more readable. Maybe we can just silence the warning with OVS_UNUSED since this variable is indeed not used? What do you think? Best regards, Ilya Maximets. _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev