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

Re: [RFC PATCH 2/3] docs: make the docs for MISRA C:2012 Dir 4.1 visible to ECLAIR


  • To: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 22 Aug 2023 12:10:28 +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=KGVRD9WRRBN34gsmqp52PvyjeGnZinUBSkxiM0NpBxg=; b=BdpfpSaLaY6I2bmIZRoSX7YiK8GtobrocswIREa3lARNwmPvxce2vFEErQfQSST/dJ+oxxD5wU3uuVNi6JYs0Pyl1ROT4XuCn6i85J3kZHKmfqQnXt5eVQXgoqvakW7ffbeKav9icIGwEpGvsIuWuH4/2US4N+2meJ2bvVaFrxz782TpoDd0fKLoFt4HEhd5a51HvVUIcpogCFhYrjvnWK2Z44OlnNqqHmMze9yu5GWrmAbXAq8H3LrQIICpn8Tinr/VAbuwc0jYXTQrGbgGN6Fpd6Sm57HFbNdjUoXlsLxfRpclCFkDzBc/29QMzh9m/hQqWVlO+hEeJBvE/prtwA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OzC4cdlskZU8e/yR52BQfgP73mmgfzCz5Z2R9J6HGg2BRciDrUGekyHnaMpSV+X9+hr+eOIPagibHk/eyWdPSaE6Q5m3IX4XMNVmS8V4kxsN9BX+FHgzw/H6eBaLfkT4c59amoiLycvGlG+O5TUiD6AU3LDXXbI9Mms+f7p2cPcwUFW8iduJ77fm0qfcVL5l0zbHmG+rC5RtFbg4p2dAGF7ZoxxfjIbMXAeXrUQkRioBKNwmBRTI02D9gz+UJFwfAhxSirvmotsNF9iY8OrWqj8TUr/bbb4T11cDkCZpywdBLCSyQtHgLZ/V0vJXPImsoTl7tzN6pnmd9f4TevJ+/A==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 22 Aug 2023 10:10:52 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

(Nicola, I'm sorry for the duplicate, but I didn't mean to drop xen-devel@.)

On 22.08.2023 10:27, Nicola Vetrini wrote:
>>> +C-runtime-failures.c: C-runtime-failures.rst
>>> +# sed is used in place of cat to prevent occurrences of '*/'
>>> +# in the .rst from breaking the compilation
>>> +   ( \
>>> +     echo "$${MISRA_HEADER}"; \
>>> +     sed -e 's|*/|*//*|' $<; \
>>> +     echo "$${MISRA_FOOTER}" \
>>> +   ) > $@
>>
>> The rule of thumb is to generate into a temporary file (then you also
>> don't need to wrap everything in parentheses [or braces]), and then
>> use mv to produce the final output. This escapes anomalies with failed
>> or interrupted commands.
>>
> 
> I do see your point for temporary files, though wrapping commands with 
> parentheses is a
> fairly common pattern in Xen Makefiles afaict.

Now I'm curious: Grepping for ') >' underneath xen/ I couldn't find a
single instance in any makefile. (I'm not going to exclude there are a
few uses, but then likely not merely to combine multiple commands'
output.)

Jan



 


Rackspace

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