* [PATCH] Fix uninitialized variable warning in __stp_call_mmap_callbacks_with_addr
@ 2011-11-03 18:10 Wade Farnsworth
2011-11-04 10:04 ` Mark Wielaard
0 siblings, 1 reply; 2+ messages in thread
From: Wade Farnsworth @ 2011-11-03 18:10 UTC (permalink / raw)
To: systemtap
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Fix uninitialized variable warning in __stp_call_mmap_callbacks_with_addr
2011-11-03 18:10 [PATCH] Fix uninitialized variable warning in __stp_call_mmap_callbacks_with_addr Wade Farnsworth
@ 2011-11-04 10:04 ` Mark Wielaard
0 siblings, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2011-11-04 10:04 UTC (permalink / raw)
To: Wade Farnsworth; +Cc: systemtap
On Thu, 2011-11-03 at 11:10 -0700, Wade Farnsworth wrote:
> When compiling a tapset, gcc complains that dentry may be used uninitialized in
> this function. Initialize it to NULL to prevent this.
Thanks, applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-11-04 10:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-03 18:10 [PATCH] Fix uninitialized variable warning in __stp_call_mmap_callbacks_with_addr Wade Farnsworth
2011-11-04 10:04 ` Mark Wielaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).