diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-04-01 02:39:12 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2012-04-01 02:39:12 +0000 |
commit | e4967d72f9e2a4b0bdeb6381504c06209471d54c (patch) | |
tree | e726382d2711b2016b7d6ddf95b52dba86797277 /sim | |
parent | d508f34d9f0e53aaef7f5b45d71496eb1cc8e273 (diff) | |
download | gdb-e4967d72f9e2a4b0bdeb6381504c06209471d54c.zip gdb-e4967d72f9e2a4b0bdeb6381504c06209471d54c.tar.gz gdb-e4967d72f9e2a4b0bdeb6381504c06209471d54c.tar.bz2 |
sim: bfin: fix build warning/style with auxvt_size
Fix warning about mixing decls and code by moving auxvt_size decl
down to the scope where it is used.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'sim')
-rw-r--r-- | sim/bfin/ChangeLog | 5 | ||||
-rw-r--r-- | sim/bfin/interp.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog index 973b788..8d5d49f 100644 --- a/sim/bfin/ChangeLog +++ b/sim/bfin/ChangeLog @@ -1,3 +1,8 @@ +2012-04-01 Mike Frysinger <vapier@gentoo.org> + + * interp.c (bfin_user_init): Move auxvt_size decl from top to + inside of auxvt check. + 2012-03-31 Mike Frysinger <vapier@gentoo.org> * dv-bfin_sic.c (bfin_sic_finish): Change iwr1 to iwr2. diff --git a/sim/bfin/interp.c b/sim/bfin/interp.c index f82e737..a367195 100644 --- a/sim/bfin/interp.c +++ b/sim/bfin/interp.c @@ -1051,7 +1051,7 @@ bfin_user_init (SIM_DESC sd, SIM_CPU *cpu, struct bfd *abfd, /* start, at_phdr, at_phnum, at_base, at_entry, pt_dynamic */ bu32 elf_addrs[6]; - bu32 auxvt, auxvt_size; + bu32 auxvt; bu32 exec_loadmap, ldso_loadmap; char *ldso_path; @@ -1144,9 +1144,9 @@ bfin_user_init (SIM_DESC sd, SIM_CPU *cpu, struct bfd *abfd, sp -= 4; \ auxvt = (at); \ sim_write (sd, sp, (void *)&auxvt, 4) - auxvt_size = 0; unsigned int egid = getegid (), gid = getgid (); unsigned int euid = geteuid (), uid = getuid (); + bu32 auxvt_size = 0; AT_PUSH (AT_NULL, 0); AT_PUSH (AT_SECURE, egid != gid || euid != uid); AT_PUSH (AT_EGID, egid); |