]> sourceware.org Git - systemtap.git/commitdiff
runtime: fix uninitialized-variable warning
authorFrank Ch. Eigler <fche@redhat.com>
Fri, 28 Sep 2012 19:07:56 +0000 (15:07 -0400)
committerFrank Ch. Eigler <fche@redhat.com>
Fri, 28 Sep 2012 21:37:23 +0000 (17:37 -0400)
* runtime/stack.c (_stp_stack_kernel_get): Initialize pc = 0.
  (_stp_stack_user_get): Ditto.

runtime/stack.c

index 682aee3323893d54a3e7e8c7d76db5c6ae4a027d..aaa3ec54bda4a8e7df0899d737ed23eb7211d6f1 100644 (file)
@@ -328,7 +328,7 @@ static unsigned long _stp_stack_unwind_one_kernel(struct context *c, unsigned de
 
 static unsigned long _stp_stack_kernel_get(struct context *c, unsigned depth)
 {
-       unsigned long pc;
+       unsigned long pc = 0;
 
        if (c->uwcache_kernel.state == uwcache_uninitialized) {
                c->uwcache_kernel.depth = 0;
@@ -513,7 +513,7 @@ static unsigned long _stp_stack_unwind_one_user(struct context *c, unsigned dept
 
 static unsigned long _stp_stack_user_get(struct context *c, unsigned depth)
 {
-       unsigned long pc;
+       unsigned long pc = 0;
 
        if (c->uwcache_user.state == uwcache_uninitialized) {
                c->uwcache_user.depth = 0;
This page took 0.030243 seconds and 5 git commands to generate.