如果我有 @fn 那么一切都被忽略。

huangapple go评论46阅读模式
英文:

If I have @fn then everything is being ignored

问题

示例:

/**
 * @fn IOChunk_t ioAllocateLargestChunk*(void)
 * @brief 分配最大可用块。
 *
 * @return 指向已分配的 @ref IOChunk_t 的指针,如果分配失败则返回 @ref NULL
 */
IOChunk_t* ioAllocateLargestChunk(void);	// 返回我们可以获取的最大正常块(从8k开始)

但如果我移除 @fn,它就正常工作:

/**
 * @brief 分配最大可用块。
 *
 * @return 指向已分配的 @ref IOChunk_t 的指针,如果分配失败则返回 @ref NULL
 */
IOChunk_t* ioAllocateLargestChunk(void);	// 返回我们可以获取的最大正常块(从8k开始)

您做错了什么?

英文:

Example:

/**
 * @fn IOChunk_t ioAllocateLargestChunk*(void)
 * @brief Allocates the largest available chunk.
 *
 * @return pointer to allocated @ref IOChunk_t or @ref NULL if allocation failed
 */
IOChunk_t* ioAllocateLargestChunk(void);	// Return the biggest normal chunk we can get (starting at 8k)

如果我有 @fn 那么一切都被忽略。

But if I remove @fn it works fine:

/**
 * @brief Allocates the largest available chunk.
 *
 * @return pointer to allocated @ref IOChunk_t or @ref NULL if allocation failed
 */
IOChunk_t* ioAllocateLargestChunk(void);	// Return the biggest normal chunk we can get (starting at 8k)

如果我有 @fn 那么一切都被忽略。

What I am doing wrong?

答案1

得分: 1

You have the function:

IOChunk_t* ioAllocateLargestChunk(void);

and in the comment you have:

@fn IOChunk_t ioAllocateLargestChunk*(void)

We see that these 2 definitions don't match (see position of the asterisks)

and your code should thus look like:

/**
 * @fn IOChunk_t* ioAllocateLargestChunk(void)
 * @brief Allocates the largest available chunk.
 *
 * @return pointer to allocated @ref IOChunk_t or @ref NULL if allocation failed
 */
IOChunk_t* ioAllocateLargestChunk(void);    // Return the biggest normal chunk we can get (starting at 8k)
英文:

You have the function:

IOChunk_t* ioAllocateLargestChunk(void);

and in the comment you have:

@fn IOChunk_t ioAllocateLargestChunk*(void)

We see that these 2 definitions don't match (see position of the asterisks)

and your code should thus look like:

/**
 * @fn IOChunk_t* ioAllocateLargestChunk(void)
 * @brief Allocates the largest available chunk.
 *
 * @return pointer to allocated @ref IOChunk_t or @ref NULL if allocation failed
 */
IOChunk_t* ioAllocateLargestChunk(void);    // Return the biggest normal chunk we can get (starting at 8k)

huangapple
  • 本文由 发表于 2023年5月30日 06:36:00
  • 转载请务必保留本文链接:https://go.coder-hub.com/76360662.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定