On Wed, Sep 26, 2012 at 1:01 PM, Lars-Peter Clausen <[email protected]> wrote: > On 09/26/2012 05:40 PM, Ezequiel Garcia wrote: >> Hi, >> >> On Wed, Sep 26, 2012 at 12:27 PM, Lars-Peter Clausen <[email protected]> wrote: >>> On 09/26/2012 04:36 PM, Peter Senna Tschudin wrote: >>>> Dear List, >>>> >>>> I'm trying to make a semantic patch for the case described on the patch: >>>> http://www.mail-archive.com/[email protected]/msg52660.html >>>> >> >> More cases like these: >> >> http://patchwork.linuxtv.org/patch/13100/ >> >> This is part of a whole patchset with subject: >> >> media: XXX: Replace struct memcpy with struct assignment >> >> The type of src and dst structs should match, but in some buggy code >> that may not be true. > > I suppose these should not be auto-converted since there is clearly a bug > somewhere. The following cocci patch can be used to find locations where > memcpy is used and the types of "to" and "from" do not match, but the size > parameter is sizeof one of them. >
True. This should not be auto-converted but rather be used as warning: "Hey! you're doing some very bad things here" Thanks, Ezequiel. _______________________________________________ Cocci mailing list [email protected] https://systeme.lip6.fr/mailman/listinfo/cocci
