summaryrefslogtreecommitdiffstats
path: root/tapset/ioblock.stp
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2009-07-08 09:38:33 +0200
committerMark Wielaard <mjw@redhat.com>2009-07-08 09:41:09 +0200
commit51305196f1d078849da1718bb6ccfbed5af182ed (patch)
tree8662c946d604e8030c7a0b6727d5c6d50f40cc28 /tapset/ioblock.stp
parent6b5e36b0fe03b9be11194916c066664d98153a14 (diff)
downloadsystemtap-steved-51305196f1d078849da1718bb6ccfbed5af182ed.tar.gz
systemtap-steved-51305196f1d078849da1718bb6ccfbed5af182ed.tar.xz
systemtap-steved-51305196f1d078849da1718bb6ccfbed5af182ed.zip
More gcc 4.5 'jump skips variable initialization' fixlets.
* tapset/ioblock.stp (__bio_start_sect): Declare, then initialize variables that could (through kread) take an early jump. * tapset/nfs_proc.stp (get_prot_from_client): Likewise. * tapset/scsi.stp (scsi_timer_pending): Likewise. * tapset/task.stp (task_cpu): Likewise. (task_open_file_handles): Likewise.
Diffstat (limited to 'tapset/ioblock.stp')
-rw-r--r--tapset/ioblock.stp9
1 files changed, 6 insertions, 3 deletions
diff --git a/tapset/ioblock.stp b/tapset/ioblock.stp
index 4bf7ad92..bc64c425 100644
--- a/tapset/ioblock.stp
+++ b/tapset/ioblock.stp
@@ -47,9 +47,12 @@ function bio_rw_str(rw)
/* returns start sector */
function __bio_start_sect:long(bio:long)
%{ /* pure */
- struct bio *bio = (struct bio *)(long)THIS->bio;
- struct block_device *bi_bdev = bio? kread(&(bio->bi_bdev)) : NULL;
- struct hd_struct *bd_part = bi_bdev? kread(&(bi_bdev->bd_part)) : NULL;
+ struct bio *bio;
+ struct block_device *bi_bdev;
+ struct hd_struct *bd_part;
+ bio = (struct bio *)(long)THIS->bio;
+ bi_bdev = bio? kread(&(bio->bi_bdev)) : NULL;
+ bd_part = bi_bdev? kread(&(bi_bdev->bd_part)) : NULL;
if (bd_part == NULL)
THIS->__retvalue = -1;
else