<<On Sat, 01 Feb 2003 16:02:57 -0800, Bakul Shah <[EMAIL PROTECTED]> said:
> I can't see what actual error is avoided by this warning. It's a potential error -- if there were an actual error, it would be an error and not a warning. The issue is simple: Say you have an object and a function declared in global scope: int foo; /* many lines of declarations */ /* perhaps this is even in a different file */ void bar(quux_t foo); At some point, somebody changes the spelling of `foo' and adds a preprocessor macro for compatibility: union baz { int foo; struct frotz *gorp; } foobaz; #define foo foobaz.foo What happens to the declaration of that function? Well, void bar(quux_t foobaz.foo); is a syntax error. My personal opinion, which is different from what style(9) recommends, is that parameter names should be omitted for all functions, EXCEPT those with ambiguous parameter types. Most functions in the kernel only operate on one object of a given type at a time, so even without the names it is (or should be) obvious what the object is used for. Some functions, however, take multiple objects of the same type (e.g., two different sorts of flags); in these cases some additional help may be warranted. In the case of user headers, if parameter names are included, they MUST be protected, because they would otherwise be polluting the user's namespace. Hence, most headers historically do not use parameter names. -GAWollman To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message