Module Name: src Committed By: hannken Date: Sat Jan 1 11:57:44 UTC 2022
Modified Files: src/sys/dev/wscons: wsemul_sun.c Log Message: Protect KASSERT() with "#ifdef DIAGNOSTIC" as its expression is undefined otherwise. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/dev/wscons/wsemul_sun.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/wscons/wsemul_sun.c diff -u src/sys/dev/wscons/wsemul_sun.c:1.33 src/sys/dev/wscons/wsemul_sun.c:1.34 --- src/sys/dev/wscons/wsemul_sun.c:1.33 Mon Sep 3 16:29:34 2018 +++ src/sys/dev/wscons/wsemul_sun.c Sat Jan 1 11:57:44 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: wsemul_sun.c,v 1.33 2018/09/03 16:29:34 riastradh Exp $ */ +/* $NetBSD: wsemul_sun.c,v 1.34 2022/01/01 11:57:44 hannken Exp $ */ /* * Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved. @@ -33,7 +33,7 @@ /* XXX DESCRIPTION/SOURCE OF INFORMATION */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wsemul_sun.c,v 1.33 2018/09/03 16:29:34 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wsemul_sun.c,v 1.34 2022/01/01 11:57:44 hannken Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -176,7 +176,9 @@ wsemul_sun_attach(int console, const str if (console) { edp = &wsemul_sun_console_emuldata; +#ifdef DIAGNOSTIC KASSERT(edp->console == 1); +#endif } else { edp = malloc(sizeof *edp, M_DEVBUF, M_WAITOK);