This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug runtime/10015] Possible uninitialized variable use in sym.c


------- Additional Comments From wenji dot huang at oracle dot com  2009-04-01 01:46 -------
This part is copy code from kernel/kallsyms.c. The variables can't be used
but uninitialized. Seems gcc on rawhide doesn't understand it well. Anyway,
we can get by it through uninitialized_var.

diff --git a/runtime/sym.c b/runtime/sym.c
index 1d88a86..be05354 100644
--- a/runtime/sym.c
+++ b/runtime/sym.c
@@ -236,9 +236,9 @@ static int _stp_module_check(void)
 
 static void _stp_symbol_print(unsigned long address)
 {
-       const char *modname;
+       const char *uninitialized_var(modname);
        const char *name;
-       unsigned long offset, size;
+       unsigned long uninitialized_var(offset), uninitialized_var(size);
 
        name = _stp_kallsyms_lookup(address, &size, &offset, &modname, NULL);


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10015

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]