diff options
author | Mark Wielaard <mjw@redhat.com> | 2009-07-08 09:38:33 +0200 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2009-07-08 09:41:09 +0200 |
commit | 51305196f1d078849da1718bb6ccfbed5af182ed (patch) | |
tree | 8662c946d604e8030c7a0b6727d5c6d50f40cc28 /tapset/nfs_proc.stp | |
parent | 6b5e36b0fe03b9be11194916c066664d98153a14 (diff) | |
download | systemtap-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/nfs_proc.stp')
-rw-r--r-- | tapset/nfs_proc.stp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/tapset/nfs_proc.stp b/tapset/nfs_proc.stp index 11463e9a..e3d9a78f 100644 --- a/tapset/nfs_proc.stp +++ b/tapset/nfs_proc.stp @@ -84,12 +84,18 @@ function get_prot_from_client:long(clnt:long) %{ /* pure */ 1:get proto */ function __i2n_ip_proto :long(dir:long,index:long) %{ /* pure */ - int index = (int) (THIS->index); - struct inode * dir = (struct inode *)(uintptr_t)(THIS->dir); - struct rpc_clnt * clnt = NFS_CLIENT(dir); /* FIXME: deref hazard! */ - struct rpc_xprt * cl_xprt = kread(&(clnt->cl_xprt)); + int index; + struct inode * dir; + struct rpc_clnt * clnt; + struct rpc_xprt * cl_xprt; + struct sockaddr_in *addr; + + index = (int) (THIS->index); + dir = (struct inode *)(uintptr_t)(THIS->dir); + clnt = NFS_CLIENT(dir); /* FIXME: deref hazard! */ + cl_xprt = kread(&(clnt->cl_xprt)); /* sockaddr_storage is used since 2.6.19. Need cast*/ - struct sockaddr_in *addr = (struct sockaddr_in *)&(cl_xprt->addr); + addr = (struct sockaddr_in *)&(cl_xprt->addr); if(index == 0) { if (kread(&(addr->sin_family)) == AF_INET) { |