diff options
author | Dave Brolley <brolley@redhat.com> | 2009-03-17 13:09:49 -0400 |
---|---|---|
committer | Dave Brolley <brolley@redhat.com> | 2009-03-17 13:09:49 -0400 |
commit | 2855f6351e26f51953af11b17c4499df4d3d3441 (patch) | |
tree | 2fa84dd226f944ae29e0dae5e9c192a0f0c0a202 /runtime/loc2c-runtime.h | |
parent | 9b6d8bd0d7a6f80a613b7c609ff1d71ddfed009b (diff) | |
parent | 67aada05e69728327de1c7b8aeeaa0193668bed8 (diff) | |
download | systemtap-steved-2855f6351e26f51953af11b17c4499df4d3d3441.tar.gz systemtap-steved-2855f6351e26f51953af11b17c4499df4d3d3441.tar.xz systemtap-steved-2855f6351e26f51953af11b17c4499df4d3d3441.zip |
Merge branch 'master' of git://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 \ |