Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern mark a variable __diagused to fix this problem affe...



details:   https://anonhg.NetBSD.org/src/rev/a9c6ca2a6432
branches:  trunk
changeset: 964543:a9c6ca2a6432
user:      mrg <mrg%NetBSD.org@localhost>
date:      Wed Aug 07 07:22:12 2019 +0000

description:
mark a variable __diagused to fix this problem affecting many builds:

kern/kern_time.c:1413:6: error: variable 'error' set but not used [-Werror=unused-but-set-variable]

diffstat:

 sys/kern/kern_time.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 60d9085840da -r a9c6ca2a6432 sys/kern/kern_time.c
--- a/sys/kern/kern_time.c      Wed Aug 07 07:08:02 2019 +0000
+++ b/sys/kern/kern_time.c      Wed Aug 07 07:22:12 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_time.c,v 1.198 2019/08/06 15:47:55 riastradh Exp $        */
+/*     $NetBSD: kern_time.c,v 1.199 2019/08/07 07:22:12 mrg Exp $      */
 
 /*-
  * Copyright (c) 2000, 2004, 2005, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.198 2019/08/06 15:47:55 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.199 2019/08/07 07:22:12 mrg Exp $");
 
 #include <sys/param.h>
 #include <sys/resourcevar.h>
@@ -1410,7 +1410,7 @@
 itimerdecr(struct ptimer *pt, int nsec)
 {
        struct itimerspec *itp;
-       int error;
+       int error __diagused;
 
        KASSERT(mutex_owned(&timer_lock));
        KASSERT(CLOCK_VIRTUAL_P(pt->pt_type));



Home | Main Index | Thread Index | Old Index