在函数上获取“空声明中的无用类型名称”

问题描述 投票:0回答:1

我在此行上获得“空声明中的无用类型名称”(第20行,第1列):

enter image description here

我不知道为什么;因为该警告似乎是related空类型名称,但事实并非如此。该函数已定义,并在代码中使用。问题出在哪里?

函数声明:

void inspect_hex_buffer(const uint8_t *buffer, int buffer_size);

功能定义:

void inspect_hex_buffer(const uint8_t *buffer, int buffer_size) {
  // Code here
}

存在的唯一标题是:

#include <stdbool.h>
#include <stdint.h>

更新

该文件的简化版本仍会触发警告:

#ifndef SIMPLE_H
#define SIMPLE_H

#include <stdbool.h>
#include <stdint.h>

void inspect_hex_buffer(const uint8_t *buffer, int buffer_size);

#endif // SIMPLE_H
c compiler-warnings gcc-warning esp32
1个回答
0
投票
之前上的#define inspect_hex_buffer(data, length)引起的,因此它不仅删除了函数调用,还删除了部分声明。
© www.soinside.com 2019 - 2024. All rights reserved.