Content-Length: 207152 | pFad | https://github.com/neilbrown/smatch/commit/84fea8bc43da

DC check_safe_pointers: only report on EXPR_PREOP dereferences. · neilbrown/smatch@84fea8b · GitHub
Skip to content

Commit

Permalink
check_safe_pointers: only report on EXPR_PREOP dereferences.
Browse files Browse the repository at this point in the history
DEREF_HOOK reports on both:
  PREOP  *
and
   struct . member

The form are the dereferences we want.
The latter aren't really dereferences at all,
just member accesses.

Also don't report the leading '*', just the thing being dereferenced.

Signed-off-by: NeilBrown <neil@brown.name>
  • Loading branch information
neilbrown committed Aug 1, 2016
1 parent 833066f commit 84fea8b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions check_safe_pointers.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ static void match_dereferences(struct expression *expr)
{
char *name;

if (expr->type != EXPR_PREOP)
return;

expr = expr->unop;

name = expr_to_str(expr);
sm_msg("dereference found: %s", name);

Expand Down

0 comments on commit 84fea8b

Please sign in to comment.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/neilbrown/smatch/commit/84fea8bc43da

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy