Re: linux-next: build warnings after merge of the jc_docs tree
From: Jonathan Corbet
Date: Mon Oct 31 2022 - 10:27:15 EST
Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> writes:
> After merging the jc_docs tree, today's linux-next build (htmldocs)
> produced these warnings:
>
> Documentation/core-api/timekeeping.rst:16: WARNING: Duplicate C declaration, also defined at translations/zh_CN/core-api/timekeeping:26.
> Declaration is '.. c:function:: ktime_t ktime_get(void)'.
[...]
> Presumably introduced by commit
>
> d24c911bd031 ("docs/zh_CN: core-api: Add timekeeping Chinese translation")
>
> but I have no idea why :-(
"Why" is the ".. c:function::" definitions in core-api/timekeeping.rst.
The translation duplicated those, leading to the warnings you mention.
I should have caught that, but the old (fast!) version of sphinx I used
to check things doesn't put out that warning. I'm just going to have to
be more patient, I guess.
I've reverted the commit in question. I'm not sure what the best
practice should be for translating documents with those declarations in
them. Perhaps the function prototype should just go into a literal
block without the c:function declaration?
Thanks,
jon