Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev add coverity annotations (variable is volatile so it...
details: https://anonhg.NetBSD.org/src/rev/3e85b7e46399
branches: trunk
changeset: 336699:3e85b7e46399
user: christos <christos%NetBSD.org@localhost>
date: Wed Mar 11 16:00:54 2015 +0000
description:
add coverity annotations (variable is volatile so it might have side effects)
diffstat:
sys/dev/lockstat.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diffs (66 lines):
diff -r d3dd50883c0d -r 3e85b7e46399 sys/dev/lockstat.c
--- a/sys/dev/lockstat.c Wed Mar 11 15:57:12 2015 +0000
+++ b/sys/dev/lockstat.c Wed Mar 11 16:00:54 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lockstat.c,v 1.21 2015/03/09 01:41:41 christos Exp $ */
+/* $NetBSD: lockstat.c,v 1.22 2015/03/11 16:00:54 christos Exp $ */
/*-
* Copyright (c) 2006, 2007 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lockstat.c,v 1.21 2015/03/09 01:41:41 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lockstat.c,v 1.22 2015/03/11 16:00:54 christos Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -166,6 +166,7 @@
lscpu_t *lc;
lsbuf_t *lb;
+ /* coverity[assert_side_effect] */
KASSERT(!lockstat_dev_enabled);
for (CPU_INFO_FOREACH(cii, ci)) {
@@ -211,6 +212,7 @@
lockstat_start(lsenable_t *le)
{
+ /* coverity[assert_side_effect] */
KASSERT(!lockstat_dev_enabled);
lockstat_init_tables(le);
@@ -249,6 +251,7 @@
int error;
lwp_t *l;
+ /* coverity[assert_side_effect] */
KASSERT(lockstat_dev_enabled);
/*
@@ -315,6 +318,7 @@
lsbuf_t *lb;
size_t sz;
+ /* coverity[assert_side_effect] */
KASSERT(!lockstat_dev_enabled);
lockstat_free();
@@ -324,6 +328,7 @@
if (lb == NULL)
return (ENOMEM);
+ /* coverity[assert_side_effect] */
KASSERT(!lockstat_dev_enabled);
KASSERT(lockstat_baseb == NULL);
lockstat_sizeb = sz;
@@ -339,6 +344,7 @@
lockstat_free(void)
{
+ /* coverity[assert_side_effect] */
KASSERT(!lockstat_dev_enabled);
if (lockstat_baseb != NULL) {
Home |
Main Index |
Thread Index |
Old Index