static FAST_FUNC int fileAction(const char *pathname,
struct stat *sb UNUSED_PARAM,
void *modname_to_match,
int depth UNUSED_PARAM){...}"int depth UNUSED_PARAM“是什么意思?
发布于 2011-02-10 16:51:39
从Busybox中的include/platform.h -1.18.3:
#define UNUSED_PARAM __attribute__ ((__unused__))来自GCC documentation的
unused
这个属性附加到一个变量上,意味着该变量可能是未使用的。对于这个变量,GCC不会产生警告。
因此,这只是一种告诉程序员和编译器该变量不一定被使用的方法。否则,编译器可能会警告您有未使用的变量。
据推测,fileAction要求depth参数与函数指针类型或其他API约束兼容,但fileAction实际上并不使用该参数。
https://stackoverflow.com/questions/4954911
复制相似问题