Re: [cocci] [RFC] Increasing usage of direct pointer assignments from memcpy() calls with SmPL?

Markus Elfring <[email protected]>
Newsgroups fr.inria.cocci,org.kernel.vger.kernel-janitors,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
> No one will thank you for making these changes...  :(  Please don't do it.

I am curious if further developers would dare to try another source code search pattern out.

@display@
expression destination, size, source, target;
@@
*target = memcpy(destination, source, size);


I would like to point out that return values from memcpy() calls are assigned
to variables in 16 source files of the software “Linux next-20251030”.

Under which circumstances can development interests grow to reduce “unused”
return values also for this kind of function?
https://wiki.sei.cmu.edu/confluence/display/c/MSC13-C.+Detect+and+remove+unused+values

Regards,
Markus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.