diff options
author | ddomingo <ddomingo@redhat.com> | 2009-03-17 15:31:54 +1000 |
---|---|---|
committer | ddomingo <ddomingo@redhat.com> | 2009-03-17 15:31:54 +1000 |
commit | b9315d945fa0700f9a1d8cf9185c66388d29023c (patch) | |
tree | 8965c368ed7ef5ff8bc835a76fa61b241133f933 /runtime/loc2c-runtime.h | |
parent | 4e7c048f5184ffcb06bc64d8be6e859156c8af97 (diff) | |
parent | bdca08879745471fdb86991a8e7276900aaaf066 (diff) | |
download | systemtap-steved-b9315d945fa0700f9a1d8cf9185c66388d29023c.tar.gz systemtap-steved-b9315d945fa0700f9a1d8cf9185c66388d29023c.tar.xz systemtap-steved-b9315d945fa0700f9a1d8cf9185c66388d29023c.zip |
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
Diffstat (limited to 'runtime/loc2c-runtime.h')
-rw-r--r-- | runtime/loc2c-runtime.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/runtime/loc2c-runtime.h b/runtime/loc2c-runtime.h index 92c017d3..16ddb950 100644 --- a/runtime/loc2c-runtime.h +++ b/runtime/loc2c-runtime.h @@ -186,7 +186,7 @@ */ #define kread(ptr) ({ \ - typeof(*(ptr)) _v; \ + typeof(*(ptr)) _v = 0; \ if (lookup_bad_addr((unsigned long)(ptr)) || \ probe_kernel_read((void *)&_v, (void *)(ptr), sizeof(*(ptr)))) \ DEREF_FAULT(ptr); \ @@ -202,14 +202,13 @@ }) #define deref(size, addr) ({ \ - intptr_t _i; \ + intptr_t _i = 0; \ switch (size) { \ case 1: _i = kread((u8 *)(addr)); break; \ case 2: _i = kread((u16 *)(addr)); break; \ case 4: _i = kread((u32 *)(addr)); break; \ case 8: _i = kread((u64 *)(addr)); break; \ default: __deref_bad(); \ - /* uninitialized _i should also be caught by -Werror */ \ } \ _i; \ }) @@ -235,7 +234,7 @@ extern void __store_deref_bad(void); ({ \ int _bad = 0; \ u8 _b; u16 _w; u32 _l; \ - intptr_t _v; \ + intptr_t _v = 0; \ if (lookup_bad_addr((unsigned long)addr)) \ _bad = 1; \ else \ @@ -275,7 +274,7 @@ extern void __store_deref_bad(void); ({ \ int _bad = 0; \ u8 _b; u16 _w; u32 _l; u64 _q; \ - intptr_t _v; \ + intptr_t _v = 0; \ if (lookup_bad_addr((unsigned long)addr)) \ _bad = 1; \ else \ @@ -392,7 +391,7 @@ extern void __store_deref_bad(void); #define deref(size, addr) \ ({ \ int _bad = 0; \ - intptr_t _v; \ + intptr_t _v = 0; \ if (lookup_bad_addr((unsigned long)addr)) \ _bad = 1; \ else \ |