From owner-svn-src-head@freebsd.org Sun Oct 22 14:25:32 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C65F2E537BD; Sun, 22 Oct 2017 14:25:32 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F953675A3; Sun, 22 Oct 2017 14:25:32 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.128.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 52DE8260117; Sun, 22 Oct 2017 16:25:30 +0200 (CEST) Subject: Re: svn commit: r324863 - in head/sys: kern sys To: Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201710221342.v9MDguCC074682@repo.freebsd.org> From: Hans Petter Selasky Message-ID: <467e3d9b-ae78-9689-6a5f-4b78301553eb@selasky.org> Date: Sun, 22 Oct 2017 16:22:48 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <201710221342.v9MDguCC074682@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Oct 2017 14:25:32 -0000 On 10/22/17 15:42, Mateusz Guzik wrote: > Author: mjg > Date: Sun Oct 22 13:42:56 2017 > New Revision: 324863 > URL: https://svnweb.freebsd.org/changeset/base/324863 > > Log: > Change kdb_active type to u_char. > > Fixes warnings from gcc and keeps the small size. Perhaps nesting should be moved > to another variablle. > > Reported by: ngie > > Modified: > head/sys/kern/subr_kdb.c > head/sys/sys/kdb.h > > Modified: head/sys/kern/subr_kdb.c > ============================================================================== > --- head/sys/kern/subr_kdb.c Sun Oct 22 12:12:52 2017 (r324862) > +++ head/sys/kern/subr_kdb.c Sun Oct 22 13:42:56 2017 (r324863) > @@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$"); > #include > #endif > > -bool __read_frequently kdb_active = 0; > +u_char __read_frequently kdb_active = 0; > static void *kdb_jmpbufp = NULL; > struct kdb_dbbe *kdb_dbbe = NULL; > static struct pcb kdb_pcb; > > Modified: head/sys/sys/kdb.h > ============================================================================== > --- head/sys/sys/kdb.h Sun Oct 22 12:12:52 2017 (r324862) > +++ head/sys/sys/kdb.h Sun Oct 22 13:42:56 2017 (r324863) > @@ -59,7 +59,7 @@ struct kdb_dbbe { > }; \ > DATA_SET(kdb_dbbe_set, name##_dbbe) > > -extern bool kdb_active; /* Non-zero while in debugger. */ > +extern u_char kdb_active; /* Non-zero while in debugger. */ > extern int debugger_on_panic; /* enter the debugger on panic. */ > extern struct kdb_dbbe *kdb_dbbe; /* Default debugger backend or NULL. */ > extern struct trapframe *kdb_frame; /* Frame to kdb_trap(). */ > > Hi, Sorry for nitpicking. I believe this variable is better suited as "int"? Or am I wrong? What does the resulting assembly code look like? --HPS