1

I have the following C function and I would like to generate doxygen documentation for it

//! Function description
/*!
    \param paramA[][] description
    \param paramB[] description
!*/

static void foo(
        int paramA[static const A_DIM1_SIZE][A_DIM2_SIZE],
        int paramB[static const B_DIM1_SIZE]);

Doxygen gives me this warning

warning: parameters of member foo are not (all) documented

I think it this error is due to the static const inside the array brackets because I documented other array function parameters with no static const inside their brackets in my codebase with similar doxygen syntax and doxygen didn't complain.

Sadly I was not able to find guidelines explaining the correct syntax to use when using doxygen to document array with static const inside their brackets.

Simon Doppler
  • 1,918
  • 8
  • 26
  • 1
    Which version of doxygen are you using? Which OS are you using? What settings are you using that are different from the default settings? What is the output you get? Note the `!` in front of the `!*/` should not be present (as it will now appear in the output. – albert Jun 25 '21 at 11:57
  • I think you are a missing a space in from the of the closing comment terminator: replace `!*/` with ` */` and it should work. – Simon Doppler Jun 25 '21 at 12:00
  • @SimonDoppler the `!` has, most likely, nothing to do with the problems OP has. I will only show up in the documentation. – albert Jun 25 '21 at 12:03
  • 1
    Oh my God it was just a typo thank you for pointing this out. I spent way too much time on it. Sorry for cluttering the site. – MarisaMargatroid Jun 25 '21 at 12:08
  • @MarisaMargatroid do you mean that the `!` -> ` ` made the difference? I could not reproduce the problem with my tests so my questions in the comment remain valid (especially the doxygen version). – albert Jun 25 '21 at 12:10
  • @albert it is not so much to do with the `!` but rather the missing space in front of the comment termination (I did it on Ubuntu 21.04 with doxygen 1.9.1) – Simon Doppler Jun 25 '21 at 12:13
  • yes, the `!` -> `` made the difference. Doxygene version is 1.8.8. I don't think I use a custom config. – MarisaMargatroid Jun 25 '21 at 12:14
  • @MarisaMargatroid the 1.8.8 version is quite old (August 2014) or did you mistyped and are you using 1.8.18, anyway I would advise to upgrade to the current version 1.9.1 – albert Jun 25 '21 at 12:42
  • 2
    @SimonDoppler I get it now what you meant, the problem that the "original" output shows a code block with the `\param ...` in it. Doxygen detects that the comment block is actually without indentation (due to the `!` in front of the `*/`, and at that moment the 4 spaces in front of `\param` are seen as a markdown indication for a code block. (Confusion at my side came due to the fact that, unfortunately, there was no description of the output OP got in the original question / what OP had expected). – albert Jun 25 '21 at 12:47

0 Answers0