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>
This commit is contained in:
Mike Frysinger 2012-04-01 02:39:12 +00:00
parent d508f34d9f
commit e4967d72f9
2 changed files with 7 additions and 2 deletions

View File

@ -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.

View File

@ -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);