Bug 217784

Summary: sys/dev/wi/if_wi_pci.c: PVS-Studio: Dead Code (CWE-561)
Product: Base System Reporter: Svyatoslav <razmyslov>
Component: kernAssignee: freebsd-net (Nobody) <net>
Status: Closed FIXED    
Severity: Affects Many People CC: kevlo
Priority: --- Keywords: patch
Version: CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
git patch none

Description Svyatoslav 2017-03-14 13:33:53 UTC
Created attachment 180817 [details]
git patch

We have found and fixed a weakness using PVS-Studio tool. PVS-Studio is a static code analyzer for C, C++ and C#: https://www.viva64.com/en/pvs-studio/

Analyzer warning: V779 Unreachable code detected. It is possible that an error is present. if_wi_pci.c 258
Comment 1 commit-hook freebsd_committer freebsd_triage 2017-03-15 09:32:40 UTC
A commit references this bug:

Author: kevlo
Date: Wed Mar 15 09:31:58 UTC 2017
New revision: 315294
URL: https://svnweb.freebsd.org/changeset/base/315294

Log:
  Fix unreachable code in wi_pci_resume().

  PR:	217784
  Submitted by:	Svyatoslav <razmyslov at viva64.com>
  Found by:	PVS-Studio

Changes:
  head/sys/dev/wi/if_wi_pci.c
Comment 2 Kevin Lo freebsd_committer freebsd_triage 2017-03-15 09:34:00 UTC
Committed in r315294, thanks.
Comment 3 commit-hook freebsd_committer freebsd_triage 2017-03-18 13:59:27 UTC
A commit references this bug:

Author: kevlo
Date: Sat Mar 18 13:58:25 UTC 2017
New revision: 315483
URL: https://svnweb.freebsd.org/changeset/base/315483

Log:
  MFC r315294:
  Fix unreachable code in wi_pci_resume().

  PR:	217784
  Submitted by:	Svyatoslav <razmyslov at viva64.com>
  Found by:	PVS-Studio

Changes:
_U  stable/11/
  stable/11/sys/dev/wi/if_wi_pci.c