public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] 4xx warnings on cmd_elf.c
@ 2008-10-31 14:30 Kumar Gala
  2008-10-31 15:16 ` Stefan Roese
  0 siblings, 1 reply; 3+ messages in thread
From: Kumar Gala @ 2008-10-31 14:30 UTC (permalink / raw)
  To: u-boot

So when I build a 4xx config I see:


cmd_elf.c: In function 'do_bootvx':
cmd_elf.c:173: warning: array subscript is below array bounds
cmd_elf.c:176: warning: array subscript is below array bounds
cmd_elf.c:181: warning: array subscript is below array bounds

                sprintf (build_buf, "ibmEmac(0,0)");

                if ((tmp = getenv ("hostname")) != NULL) {
                        sprintf (&build_buf[strlen (build_buf - 1)],
                                "host:%s ", tmp);
                } else {
                        sprintf (&build_buf[strlen (build_buf - 1)],
                                ": ");
                }

                if ((tmp = getenv ("ipaddr")) != NULL) {
                        sprintf (&build_buf[strlen (build_buf - 1)],
                                "e=%s ", tmp);
                }


these seem suspect.. should this be &build_buf[strlen(build_buf) - 1] ?

- k

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-11-01 10:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-31 14:30 [U-Boot] 4xx warnings on cmd_elf.c Kumar Gala
2008-10-31 15:16 ` Stefan Roese
2008-11-01 10:30   ` Niklaus Giger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox