unused
This attribute, attached to a variable, means that the variable is meant to be possibly
unused. GCC will not produce a warning for this variable.
So, it is just a way to tell both the human programmers and the compiler that the variable is not necessarily used. Otherwise, the compiler may warn you about an unused variable.
Presumably, fileAction requires the depth parameter to be compatible with a function pointer type or other API constraints but fileAction doesn't actually use the parameter.
From
include/platform.hin Busybox-1.18.3:And from the GCC documentation:
So, it is just a way to tell both the human programmers and the compiler that the variable is not necessarily used. Otherwise, the compiler may warn you about an unused variable.
Presumably,
fileActionrequires thedepthparameter to be compatible with a function pointer type or other API constraints butfileActiondoesn't actually use the parameter.