Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/usr.sbin/wake (Christos Zoulas) wrote:
> >Log Message:
> >remove stupid casts.  if lint complains about return values that are
> >ignored, lint should fe fixed, and not code being cluttered.
> Please explain to me how you propose we fix lint. Or to be more precise,
> how does the code convey intent about purposefully ignoring the return
> value of a function so that lint can ignore it. FYI this change is against
> the current style guide, so if you are going to be pushing for more changes
> like that, I suggest that you get consensus about changing the style guide
> first. Otherwise I suggest that you revert the change, because it only
> serves to produce lint warnings for someone that was linting cleanly before.

I would, in essence, agree with this.  Not because of lint, but such void
cast, primarily, demonstrates to developer/reader that function returns some
value and we deliberately ignore it.

However, functions like printf(), memset() and friends are common and well
known cases where return value is usually ignored.  We do not cast them in
kernel code (nor I think we should).  If lint complains about ignoring of
memset() return value - I am really not interested. :)


Home | Main Index | Thread Index | Old Index