On Friday, January 3, 2020, Gregory Nutt <spudan...@gmail.com> wrote:

>
> Is that because there are more places that don't do it than places that do?
>>
> Yes.. and I think just a matter of personal preference.
>
>> Because it seems to me that the right thing to do is to leave compliant
>> code alone and bring non-compliant code into compliance with the standard,
>> otherwise there is no standard.
>>
>> Thoughts?
>>
>
> It has already been merged and a lot of water has passed under the bridge
> since then.  It would be tough to detangle now.
>
> I don't think it is am important part of the coding standard, so I don't
> mind just removing these two sentences from the coding standard.
>
> I prefer having the (void) present because it says to me, "Don't worry, I
> have thought this through and I don't need the return value."  Otherwise, I
> am suspicious of ignored returned values.
>
> But that is a pretty minor part of the coding standard.


I made this change just because the usage is inconsistent through out the
code base. the choice to remove the cast, not to add the cast, because:
1.It is more easier to remove the cast by command
2.This change is smaller than to add the cast
3.It make the code a little bit clean(e.g. memcpy... vs. (void)memcpy...)
4.The return value from many function don't indicate the pass/fail(e.g.
memcpy return destination), it is reasonable to ignore it silently if the
caller don't use that information.

Greg
>
>
>

Reply via email to