This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/20389] New: warn on $var.field when $var->field correct
- From: "fche at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sourceware dot org
- Date: Tue, 19 Jul 2016 21:00:20 +0000
- Subject: [Bug translator/20389] New: warn on $var.field when $var->field correct
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=20389
Bug ID: 20389
Summary: warn on $var.field when $var->field correct
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: translator
Assignee: systemtap at sourceware dot org
Reporter: fche at redhat dot com
Target Milestone: ---
I could've sworn we already have a warning for this, but can't find it:
e.g.:
stap -p4 -e ' probe kernel.function("__d_drop") { x=$dentry->d_lockref.count
println(x) }'
WARNING: never-assigned local variable 'count' (similar: x): identifier 'count'
at <input>:1:59
source: probe kernel.function("__d_drop") { x=$dentry->d_lockref.count
println(x) }
^
semantic error: while processing probe
kernel.function("__d_drop@fs/dcache.c:468") from: kernel.function("__d_drop")
semantic error: 'struct lockref' is being accessed instead of a member:
identifier '$dentry' at :1:40
source: probe kernel.function("__d_drop") { x=$dentry->d_lockref.count
println(x) }
instead of something saying that the '.' should have been a '->'.
--
You are receiving this mail because:
You are the assignee for the bug.