[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] docs: Format (void *) to fix reStructuredText emphasis warnings
- To: Bernhard Kaindl <bernhard.kaindl@xxxxxxxxxx>
- From: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
- Date: Tue, 28 Apr 2026 22:22:10 +0200
- Arc-authentication-results: i=1; bugseng.com; arc=none smtp.remote-ip=162.55.131.47
- Arc-message-signature: i=1; d=bugseng.com; s=openarc; a=rsa-sha256; c=relaxed/relaxed; t=1777407731; h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References: Message-ID:X-Sender:Organization:Content-Type: Content-Transfer-Encoding; bh=MeGrH7FFVtCqyv/NbgnvNcXlzgvwjVd3HPzbRlDpFcA=; b=XR0X/LFs+qjMVkkJXw12/NPWZHxnmWz3/JWRN5mzwxFw2ABmqQK8uiGkzQhBiMw/VQFb A1gqOlzmTR07Uo/fHugo/gUgtKtTgB98psyiaPoslfuGzfubminfX1++0SKolO/nIrsf0 IQoTCIFZAy3ft8w0IAdgiFYHSoFHhII61HAvmV2YsjZcJMcPRSaelGLdRZ5dzu1PBW/kG HDBGgLA40ru/Lu71sKz8IiNyxg0V4K2sAsqjCuhn4gzNI6kxLMF8uj09j5OkXpfro7BnA IWFxhbsAzvOvp+ZeceuboT/S9pL7V1N3c5yGNKMH4AoaknKDa/ck3oHJga5sroc+HQcYD eJ2yGg5oSm2Gly0k4LeWEzZxJ6kTcdFD/YjTM3FPiUGMQE7FW/dA1ImNTuBxWw4LdyMNy McSMnwY+mRW6iwdEwZzC2PoTtVgip7tu8qBqPtzakMMWqO56nJzeVT2HZjDGEsHqs6+tB 20/X2PUpTRoJwfAlTz7CGTF9QHcxZQK5K4WFEeX+GsiHtAHw3lhOzu6ZUWL3tF86bGi1/ /7yZnch+CM/Qe27cHb4sz85410uZjB9V8grepeJuJqqts+ejmuNoG8+gnuOi/CwKte1FW erine2Zim4qdXYQ02fDQr9ihsuqpKMFZnJ9SwIrbWJ9dyfE4d0qS0bIDBmXNFAI=
- Arc-seal: i=1; d=bugseng.com; s=openarc; a=rsa-sha256; cv=none; t=1777407731; b=L9HYxzD6yfMPRcXI/KX4VWloGcTZVZZ30lzMkkt93oSxTomS1U/RkMKT6xEKT8GuasXw SHeOI56NMaIV4GsSxO9VsoDxtfhFVFVC2AzihpUhu0GHRUVOZnuaHiGBVqYpyR4ARXUJH aiNVUdbH6cS2SMZ+HwE/pM0kG4feaT0IY5iHT0KLchqWsWBvIuR3rAw1hPSBFGdhT8cjC LK6E4h58TldThHe+A1ZUCuku3i3/e0mqOTxz4Hj8qwM1BdfoJU7i1qnjlUU8DZviOu6/F ekDuVdD93D7iTvRdBkC6p8iiLxDr/ABqrgbWwTK4KeSgX1zg5h9iTVatYWDko0/vRAVHF hpO9/O4gEsve1GmIcUI8gGey0eqOC4iFCI4375q6ETb3xtd87ePzJxDRhnqSGfAaAOCWr wE45EzhfzM3zXB4u/gEDkSEKGiWQ9ZOUSUS3x9qJyBGQpSzHX6OMSYddfjYUox23tYNSH guR4NornV8V0dvRqNztFt/tAiHQfCMRE1nNC0INUOMZTbHfvi7rG5dzWHkxALPchlKL0Y WHNnOStdK9M8w2JkwfIDFvnM5nRXvIHw67rJ8yk/pgnV6jipIswWZS4ffnyj7mIm5TLpW yEd7UPihXrHVqixabJV9FyNBmD5ZZi3SHQtmM6b33mW+obf17CpJZdKPVeGzTOk=
- Authentication-results: eu.smtp.expurgate.cloud; none
- Authentication-results: bugseng.com; arc=none smtp.remote-ip=162.55.131.47
- Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
- Delivery-date: Tue, 28 Apr 2026 20:22:29 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 2026-04-28 20:34, Bernhard Kaindl wrote:
Fix warnings when rendering the Sphinx documentation because
with reStructuredText, in the character sequence of '(void *)',
the characters *) are seen as an emphasis start-string:
WARNING: Inline emphasis start-string without end-string. [docutils]
Fix this by formatting it with ``(void *)`` as an inline literal
which can be used for monospaced code snippets like these that
can contain any characters without any markup interpretation.
Signed-off-by: Bernhard Kaindl <bernhard.kaindl@xxxxxxxxxx>
Reviewed-by: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
See nit below
---
Preview based on the new theme and design docs arrangement just
submitted:
https://bernhard-xen.readthedocs.io/en/void/misra/rules.html
https://bernhard-xen.readthedocs.io/en/void/misra/deviations.html
---
docs/misra/deviations.rst | 4 ++--
docs/misra/rules.rst | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/docs/misra/deviations.rst b/docs/misra/deviations.rst
index b04830959694..c972d5b2ad49 100644
--- a/docs/misra/deviations.rst
+++ b/docs/misra/deviations.rst
@@ -366,13 +366,13 @@ Deviations related to MISRA C:2012 Rules:
- Tagged as `safe` for ECLAIR.
* - R11.1
- - The conversion from a function pointer to unsigned long or
'(void *)' does
+ - The conversion from a function pointer to unsigned long or
``(void *)`` does
not lose any information, provided that the target type has
enough bits
to store it.
- Tagged as `safe` for ECLAIR.
* - R11.1
- - Conversion from unsigned long or '(void *)' to a function
pointer can
+ - Conversion from unsigned long or ``(void *)`` to a function
pointer can
restore full information, provided that the source type has
enough bits
to restore it.
There are further instance below which should similarly be rendered with
a monospaced font, as they are code
e.g.
The conversion from ‘void noreturn (*)(…)’ to ‘void (*)(…)’ is safe
because the semantics of the ‘noreturn’ attribute
Perhaps those don't cause warnings, but if we want to visualize this as
code in a monospaced font, then it probably should be uniformly used in
the document. We haven't been 100% consistent when writing these
documents originally; partly due to the fact that different people were
involved, but this could be an occasion to remedy that.
But perhaps that is best done in a follow-up patch, so feel free to take
my r-by for this patch.
- Tagged as `safe` for ECLAIR.
diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst
index b3e929307d51..fc6fdfd313d0 100644
--- a/docs/misra/rules.rst
+++ b/docs/misra/rules.rst
@@ -430,9 +430,9 @@ maintainers if you want to suggest a change.
and any other type
- All conversions to integer types are permitted if the
destination
type has enough bits to hold the entire value. Conversions to
bool
- and void* are permitted. Conversions from 'void noreturn
(*)(...)'
- to 'void (*)(...)' are permitted. Conversions from unsigned
long or
- '(void *)' to a function pointer are permitted.
+ and ``void *`` are permitted. Conversions from ``void noreturn
(*)(...)``
+ to ``void (*)(...)`` are permitted. Conversions from unsigned
long or
+ ``(void *)`` to a function pointer are permitted.
Example::
unsigned long func_addr = (unsigned long)&some_function;
--
Nicola Vetrini, B.Sc.
Software Engineer
BUGSENG (https://bugseng.com)
LinkedIn: https://www.linkedin.com/in/nicola-vetrini-a42471253
|