mu**************@gmail.com said:
hi,
while i was browsing some codes, i've seen multiple times casting the
return value of memcpy function to void.
(
.....;
.....;
(void)memcpy(.......);
....;
)
is there any particular reason for that?
Three possible reasons spring to mind:
(1) it might shut lint up. Depending on which lint you've got.
(2) it might be mandated by some stupid in-house coding style thing.
(3) some people just love to type.
There is no technical merit in it whatsoever, but it doesn't do any harm
either (except to the eyes).
--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)