Wireshark-dev: [Wireshark-dev] Commit r51222 triggered a coverity message:wq

From: Joerg Mayer <jmayer@xxxxxxxxx>
Date: Tue, 13 Aug 2013 12:26:15 +0200
Hello,

commit

------------------------------------------------------------------------
r51222 | martinm | 2013-08-08 18:56:41 +0200 (Do, 08 Aug 2013) | 1 line

Apply same changes to common stats to tshark tap
------------------------------------------------------------------------

Seems to have triggered some coverity message. In case there really isn't
a break missing then maybe adding a fallthrough comment would be in order.

Ciao
    Jörg

----- Forwarded message from scan-admin@xxxxxxxxxxxx -----

From: scan-admin@xxxxxxxxxxxx
To: jmayer@xxxxxxxxx
CC:
Subject: New Defects reported by Coverity Scan for Wireshark
Date: Thu, 08 Aug 2013 18:26:14 -0700


Hi,

Please find the latest report on new defect(s) introduced to Wireshark found with Coverity Scan

Defect(s) Reported-by: Coverity Scan


** CID 1061546: Missing break in switch (MISSING_BREAK)


CID 1061546: Missing break in switch (MISSING_BREAK)

/ui/cli/tap-macltestat.c: 246 ( unterminated_case)
   243                hs->common_stats.pch_bytes += si->single_number_of_bytes;
   244                hs->common_stats.pch_paging_ids += si->number_of_paging_ids;
   245                return 1;
>>> This case (value 4) is not terminated by a 'break' statement.
   246            case SI_RNTI:
   247                hs->common_stats.sib_frames++;
   248                hs->common_stats.sib_bytes += si->single_number_of_bytes;
   249            case NO_RNTI:
   250                hs->common_stats.mib_frames++;


/ui/cli/tap-macltestat.c: 249 ( fallthrough)
   246            case SI_RNTI:
   247                hs->common_stats.sib_frames++;
   248                hs->common_stats.sib_bytes += si->single_number_of_bytes;
>>> The above case falls through to this one.
   249            case NO_RNTI:
   250                hs->common_stats.mib_frames++;
   251                return 1;
   252            case RA_RNTI:
   253                hs->common_stats.rar_frames++;


--
Joerg Mayer                                           <jmayer@xxxxxxxxx>
We are stuck with technology when what we really want is just stuff that
works. Some say that should read Microsoft instead of technology.