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

Re: MISRA C:2012 D4.11 caution on staging


  • To: Julien Grall <julien@xxxxxxx>, Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 17 Oct 2023 08:11:17 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=dgGMb4drhATjxD3GXvHHzlPpnVQdcaB+mfRxDUNkf1k=; b=evnyq3jU4CdzO5/kwCUR2sul90M+Lk25O7A4oPVSe2j2hxOUdaC87JyAF1eahOjsn6cxWufI6wAhGJfN9svOhZIqTK7CjIrfqjrdoP+W+CcfXdiTrq7CMPohkNz8Z4P591Ku/l1i6Ar0DDgrkARJ3S87nU1enrksIy9RprwdaaNozBjQZ2uF6QI025H3Ouhy2ESr1GjGmzrixLq6baN+Ns4OBYtuRP8sTLYWpwwYWWTHfeENJDCcX1ns33iJ4ZGrsmbA6TCTTklcVRow4QyQW6VSgWELINpP0EMFsAYq3g6P/clRj4L5aScbFZasGVNqRnvwlT//U9AOzBhmcrunmA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cSLwQC2yRXwTBzQRwGQIhFY6W2TTgNfdRllLYDEK1foG7WHUv+w1F54+hf/S5G0akhocwWJ4gdbUAHvgLafxP3kp3vrSOT13wfKxvut5K+wg3julyn+I4aFREAin2fVHUIA7w4DIvNI6nbnfqIaMgz/XsEexG91OoW4fwjcFbQgJEK0lDUcYK2b9Cw1lakTy5bYPYJVqgpb4YWB7eq/vaHFnATkBTGoySKq9TqaEsycHCOqDz5icIRSnsTCaLpVi4WTe7uNIYKTH26a8ffH6fYrpyt/eBnsxcog6dJVgNJg7Su1r38PWcpAAWMTb44ulTsvX1PQXPgpiGAxRkQsfAQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, consulting@xxxxxxxxxxx, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, roger.pau@xxxxxxxxxx, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Tue, 17 Oct 2023 06:11:25 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 16.10.2023 20:06, Julien Grall wrote:
> Instead, it would be best to find a way to help Eclair to detect this is 
> not an issue and also improve readability. Would the following help Eclair?
> 
> diff --git a/xen/common/domain.c b/xen/common/domain.c
> index 30c227967345..ab16124eabd6 100644
> --- a/xen/common/domain.c
> +++ b/xen/common/domain.c
> @@ -671,6 +671,8 @@ struct domain *domain_create(domid_t domid,
> 
>       if ( !is_idle_domain(d) )
>       {
> +        ASSERT(config);
> +
>           watchdog_domain_init(d);
>           init_status |= INIT_watchdog;

Just to mention it: Even if right now it turned out to help, it wouldn't
once release builds are also checked.

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.