On 03/30/12 16:59, Bruce Furber wrote:
try   strcpy AND NOT "void strcpy" 
http://src.opensolaris.org/source/search?q=strcpy+AND+NOT+%22void+strcpy%22&project=onnv&defs=&refs=&path=&hist
 = ----- Original Message -----
I wonder if it is possible to do negative proximity search - e.g. I'd
like to search for all calls to strcpy() which do not have the (void)
cast before them. Tried things like:
    "void strcpy"~NOT 1
in the full search but it does not seem to do the trick.


Thanks ! This almost works for my case - the idea was to search for unchecked return values from strcpy() of course. I adjusted this a bit:

full:strcpy AND NOT "void strcpy"~1 AND NOT "= strcpy"~1 path:". c"~1

i.e.

+full:strcpy -full:"void strcpy"~1 -full:"= strcpy"~1 +path:". c"~1

and it even found gems like this:

  (void) strcat(strcat(strcpy(shadow_dest, ...


v.
_______________________________________________
opengrok-discuss mailing list
opengrok-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opengrok-discuss

Reply via email to