[PATCH] Fix uninitialized variable warning in __stp_call_mmap_callbacks_with_addr
Wade Farnsworth
wade_farnsworth@mentor.com
Thu Nov 3 18:10:00 GMT 2011
When compiling a tapset, gcc complains that dentry may be used uninitialized in
this function. Initialize it to NULL to prevent this.
Signed-off-by: Wade Farnsworth <wade_farnsworth@mentor.com>
---
runtime/task_finder.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/runtime/task_finder.c b/runtime/task_finder.c
index 70d5ba1..6be9b07 100644
--- a/runtime/task_finder.c
+++ b/runtime/task_finder.c
@@ -678,7 +678,7 @@ __stp_call_mmap_callbacks_with_addr(struct stap_task_finder_target *tgt,
struct vm_area_struct *vma;
char *mmpath_buf = NULL;
char *mmpath = NULL;
- struct dentry *dentry;
+ struct dentry *dentry = NULL;
unsigned long length = 0;
unsigned long offset = 0;
unsigned long vm_flags = 0;
--
1.7.0.4
More information about the Systemtap
mailing list