Date: Sun, 14 Aug 2016 10:01:56 -0700 From: Adrian Chadd <adrian@freebsd.org> To: "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org>, Ed Maste <emaste@freebsd.org>, freebsd-current <freebsd-current@freebsd.org> Subject: compiling elf toolchain under gcc-5.3 mips Message-ID: <CAJ-VmonQW2qU2zSnJe7UiDp%2B5KoFCgQXng8RKapFXLpiD8QQww@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
hiya,
This seems to be needed for compiling elftoolchain under gcc-5.3
targeting mips (CROSS_TOOLCHAIN=mips-gcc) otherwise it complains that
sz isn't always initialised:
adrian@gertrude:~/work/freebsd/head-embedded/src % svn diff contrib
Index: contrib/elftoolchain/elfcopy/ascii.c
===================================================================
--- contrib/elftoolchain/elfcopy/ascii.c (revision 303837)
+++ contrib/elftoolchain/elfcopy/ascii.c (working copy)
@@ -251,6 +251,7 @@
sec_index = 1;
sec_addr = entry = 0;
while (fgets(line, _LINE_BUFSZ, ifp) != NULL) {
+ sz = 0; /* Quieten GCC-5.3 */
if (line[0] == '\r' || line[0] == '\n')
continue;
if (line[0] == '$' && line[1] == '$') {
Is that acceptable?
-adrian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmonQW2qU2zSnJe7UiDp%2B5KoFCgQXng8RKapFXLpiD8QQww>
