summary refs log tree commit diff stats
path: root/docs/conf.py
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2020-04-14 13:50:41 +0100
committerPeter Maydell <peter.maydell@linaro.org>2020-04-14 17:15:33 +0100
commit152d1967f650f67b7ece3a5dda77d48069d72647 (patch)
tree4abda175287777901c8b39a502218b776043c593 /docs/conf.py
parenta62d563796e369b910073eeec02d604f23dcbe89 (diff)
downloadfocaccia-qemu-152d1967f650f67b7ece3a5dda77d48069d72647.tar.gz
focaccia-qemu-152d1967f650f67b7ece3a5dda77d48069d72647.zip
kernel-doc: Use c:struct for Sphinx 3.0 and later
The kernel-doc Sphinx plugin and associated script currently emit
'c:type' directives for "struct foo" documentation.

Sphinx 3.0 warns about this:
  /home/petmay01/linaro/qemu-from-laptop/qemu/docs/../include/exec/memory.h:3: WARNING: Type must be either just a name or a typedef-like declaration.
  If just a name:
    Error in declarator or parameters
    Invalid C declaration: Expected identifier in nested name, got keyword: struct [error at 6]
      struct MemoryListener
      ------^
  If typedef-like declaration:
    Error in declarator or parameters
    Invalid C declaration: Expected identifier in nested name. [error at 21]
      struct MemoryListener
      ---------------------^

because it wants us to use the new-in-3.0 'c:struct' instead.

Plumb the Sphinx version through to the kernel-doc script
and use it to select 'c:struct' for newer versions than 3.0.

Fixes: LP:1872113
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Diffstat (limited to 'docs/conf.py')
0 files changed, 0 insertions, 0 deletions