Coverity-updates archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
New Defects reported by Coverity Scan for NetBSD-i386-kernel
Hi,
Please find the latest report on new defect(s) introduced to NetBSD-i386-kernel found with Coverity Scan.
3 new defect(s) introduced to NetBSD-i386-kernel found with Coverity Scan.
2 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 3 of 3 defect(s)
** CID 1306275: Code maintainability issues (UNUSED_VALUE)
/sys/ddb/db_examine.c: 106 in db_examine()
________________________________________________________________________________________________________
*** CID 1306275: Code maintainability issues (UNUSED_VALUE)
/sys/ddb/db_examine.c: 106 in db_examine()
100 case 'l': /* long-word */
101 size = 4;
102 width = 12;
103 break;
104 case 'q':
105 if (sizeof(db_expr_t) != sizeof(uint64_t)) {
>>> CID 1306275: Code maintainability issues (UNUSED_VALUE)
>>> Assigning value "-1" to "size" here, but that stored value is overwritten before it can be used.
106 size = -1;
107 db_error("q not supported\n");
108 /*NOTREACHED*/
109 }
110 case 'L': /* implementation maximum */
111 size = sizeof value;
** CID 1306276: Code maintainability issues (UNUSED_VALUE)
/sys/ufs/ufs/ufs_inode.c: 105 in ufs_inactive()
________________________________________________________________________________________________________
*** CID 1306276: Code maintainability issues (UNUSED_VALUE)
/sys/ufs/ufs/ufs_inode.c: 105 in ufs_inactive()
99 goto out;
100 if (ip->i_nlink <= 0 && (mp->mnt_flag & MNT_RDONLY) == 0) {
101 #ifdef UFS_EXTATTR
102 ufs_extattr_vnode_inactive(vp, curlwp);
103 #endif
104 if (ip->i_size != 0)
>>> CID 1306276: Code maintainability issues (UNUSED_VALUE)
>>> Assigning value from "ufs_truncate(vp, 0ULL, (kauth_cred_t)0xffffffff)" to "error" here, but that stored value is overwritten before it can be used.
105 error = ufs_truncate(vp, 0, NOCRED);
106 #if defined(QUOTA) || defined(QUOTA2)
107 error = UFS_WAPBL_BEGIN(mp);
108 if (error == 0) {
109 wapbl_locked = true;
110 (void)chkiq(ip, -1, NOCRED, 0);
** CID 1306277: Code maintainability issues (UNUSED_VALUE)
/sys/ddb/db_write_cmd.c: 72 in db_write_cmd()
________________________________________________________________________________________________________
*** CID 1306277: Code maintainability issues (UNUSED_VALUE)
/sys/ddb/db_write_cmd.c: 72 in db_write_cmd()
66 case 'l':
67 case '\0':
68 size = 4;
69 break;
70 case 'q':
71 if (sizeof(db_expr_t) != sizeof(uint64_t)) {
>>> CID 1306277: Code maintainability issues (UNUSED_VALUE)
>>> Assigning value "-1" to "size" here, but that stored value is overwritten before it can be used.
72 size = -1;
73 db_error("q not supported\n");
74 /*NOTREACHED*/
75 }
76 case 'L':
77 size = sizeof(db_expr_t);
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://scan.coverity.com/projects/1450?tab=overview
To manage Coverity Scan email notifications for "coverity-updates%netbsd.org@localhost", click https://scan.coverity.com/subscriptions/edit?email=coverity-updates%40netbsd.org&token=487286ca1a9a4f4bd485d16f66b5e782 .
Home |
Main Index |
Thread Index |
Old Index