Bug 238183 - cam/scsi/scsi_sa.c: warnings issued by static analysis
Summary: cam/scsi/scsi_sa.c: warnings issued by static analysis
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2019-05-28 07:26 UTC by Alexey Dokuchaev
Modified: 2024-08-01 02:57 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Dokuchaev freebsd_committer freebsd_triage 2019-05-28 07:26:23 UTC
PVS Studio produces lots of warnings over /usr/src/sys/cam/scsi/scsi_sa.c, but most of them are too noisy and out of scope right now.  Three of them, however, look more sensible and probably worth taking a closer look:

cam/scsi/scsi_sa.c:3216:1: warning: V547 Expression 'softc->last_media_blksize == 0' is always false.

cam/scsi/scsi_sa.c:3550:1: warning: V560 A part of conditional expression is always false: (stream_valid == 0).

cam/scsi/scsi_sa.c:4416:1: warning: V519 The 'error' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 4414, 4416.