From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13252 invoked by alias); 14 Oct 2013 19:20:21 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 13241 invoked by uid 89); 14 Oct 2013 19:20:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: lug-owl.de Received: from lug-owl.de (HELO lug-owl.de) (195.71.106.12) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Mon, 14 Oct 2013 19:20:20 +0000 Received: by lug-owl.de (Postfix, from userid 1001) id 6CA44F0354; Mon, 14 Oct 2013 21:20:17 +0200 (CEST) Date: Mon, 14 Oct 2013 19:20:00 -0000 From: Jan-Benedict Glaw To: Nick Clifton Cc: Binutils Subject: [buildrobot][PATCH]: gas/config/tc-score.c:4492: error: missing braces around initializer Message-ID: <20131014192017.GE27569@lug-owl.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="kA1LkgxZ0NN7Mz3A" Content-Disposition: inline X-gpg-fingerprint: 250D 3BCF 7127 0D8C A444 A961 1DBD 5E75 8399 E1BB X-gpg-key: wwwkeys.de.pgp.net X-Echelon-Enable: howto poison arsenous mail psychological biological nuclear warfare test the bombastical terror of flooding the spy listeners explosion sex drugs and rock'n'roll X-TKUeV: howto poison arsenous mail psychological biological nuclear warfare test the bombastical terror of flooding the spy listeners explosion sex drugs and rock'n'roll User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2013-10/txt/msg00225.txt.bz2 --kA1LkgxZ0NN7Mz3A Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 5078 Hi! I think this is another fallout of the cppcheck silencing: gcc -DHAVE_CONFIG_H -I. -I/home/jbglaw/repos/binutils/gas -I. -I/home/jbgl= aw/repos/binutils/gas -I../bfd -I/home/jbglaw/repos/binutils/gas/config -I/= home/jbglaw/repos/binutils/gas/../include -I/home/jbglaw/repos/binutils/gas= /.. -I/home/jbglaw/repos/binutils/gas/../bfd -DLOCALEDIR=3D"\"/home/jbglaw/= build/score-elf/_install_/share/locale\"" -W -Wall -Wstrict-prototypes -Wm= issing-prototypes -Wshadow -Werror -g -O2 -MT tc-score.o -MD -MP -MF .deps/= tc-score.Tpo -c -o tc-score.o `test -f 'config/tc-score.c' || echo '/home/j= bglaw/repos/binutils/gas/'`config/tc-score.c cc1: warnings being treated as errors /home/jbglaw/repos/binutils/gas/config/tc-score.c: In function =E2=80=98s3_= do_macro_bcmp=E2=80=99: /home/jbglaw/repos/binutils/gas/config/tc-score.c:4492: error: missing brac= es around initializer /home/jbglaw/repos/binutils/gas/config/tc-score.c:4492: error: (near initia= lization for =E2=80=98inst_main.name=E2=80=99) /home/jbglaw/repos/binutils/gas/config/tc-score.c:4492: error: missing init= ializer /home/jbglaw/repos/binutils/gas/config/tc-score.c:4492: error: (near initia= lization for =E2=80=98inst_main.instruction=E2=80=99) make[3]: *** [tc-score.o] Error 1 This is from gcc76 (cfarm machine), you can find the full build log here: http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=3D19332 http://toolchain.lug-owl.de/buildbot/deliver_artifact.php?mode=3Dview&id=3D= 69223 While the "missing initializer" warning is actually wrong, it's right that there are braces missing around the char[] initializer: 383 struct s3_score_it 384 { 385 char name[s3_INSN_NAME_LEN]; 386 bfd_vma instruction; 387 bfd_vma relax_inst; 388 int size; 389 int relax_size; 390 enum score_insn_type type; 391 char str[s3_MAX_LITERAL_POOL_SIZE]; 392 const char *error; 393 int bwarn; 394 char reg[s3_INSN_NAME_LEN]; 395 struct 396 { 397 bfd_reloc_code_real_type type; 398 expressionS exp; 399 int pc_rel; 400 }reloc; 401 }; [...] 4492 struct s3_score_it inst_main =3D { 0 }; A similar error (though due to a bogus warning) is generated for tic6x (see http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=3D19186 and http://toolchain.lug-owl.de/buildbot/deliver_artifact.php?mode=3Dview&id=3D= 67284): gcc -DHAVE_CONFIG_H -I. -I/home/jbglaw/repos/binutils/gas -I. -I/home/jbgl= aw/repos/binutils/gas -I../bfd -I/home/jbglaw/repos/binutils/gas/config -I/= home/jbglaw/repos/binutils/gas/../include -I/home/jbglaw/repos/binutils/gas= /.. -I/home/jbglaw/repos/binutils/gas/../bfd -DLOCALEDIR=3D"\"/home/jbglaw/= build/tic6x-uclinux/_install_/share/locale\"" -W -Wall -Wstrict-prototypes= -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT tc-tic6x.o -MD -MP -MF .d= eps/tc-tic6x.Tpo -c -o tc-tic6x.o `test -f 'config/tc-tic6x.c' || echo '/ho= me/jbglaw/repos/binutils/gas/'`config/tc-tic6x.c cc1: warnings being treated as errors /home/jbglaw/repos/binutils/gas/config/tc-tic6x.c: In function =E2=80=98tic= 6x_parse_operand=E2=80=99: /home/jbglaw/repos/binutils/gas/config/tc-tic6x.c:1599: error: missing init= ializer /home/jbglaw/repos/binutils/gas/config/tc-tic6x.c:1599: error: (near initia= lization for =E2=80=98second_reg.num=E2=80=99) make[3]: *** [tc-tic6x.o] Error 1 1109 /* A register or register pair read by the assembler. */ 1110 typedef struct 1111 { 1112 /* The side the register is on (1 or 2). */ 1113 unsigned int side; 1114 /* The register number (0 to 31). */ 1115 unsigned int num; 1116 } tic6x_register; [...] 1599 tic6x_register first_reg, second_reg =3D { 0 }; Thus is suggest: 2013-10-14 Jan-Benedict Glaw gas/ * config/tc-score.c (s3_do_macro_bcmp): Don't initialize variable. * config/tc-tic6x.c (tic6x_parse_operand): Ditto. =09 diff --git a/gas/config/tc-score.c b/gas/config/tc-score.c index 2bb3fbe..822b9cf 100644 --- a/gas/config/tc-score.c +++ b/gas/config/tc-score.c @@ -4489,7 +4489,7 @@ s3_do_macro_bcmp (char *str) char* ptemp; int i =3D 0; struct s3_score_it inst_expand[2]; - struct s3_score_it inst_main =3D { 0 }; + struct s3_score_it inst_main; =20 memset (inst_expand, 0, sizeof inst_expand); s3_skip_whitespace (str); diff --git a/gas/config/tc-tic6x.c b/gas/config/tc-tic6x.c index fda9cd3..81f33f4 100644 --- a/gas/config/tc-tic6x.c +++ b/gas/config/tc-tic6x.c @@ -1596,7 +1596,7 @@ tic6x_parse_operand (char **p, tic6x_operand *op, uns= igned int op_forms, /* See if this looks like a register or register pair. */ if (!operand_parsed && (op_forms & (TIC6X_OP_REG | TIC6X_OP_REGPAIR))) { - tic6x_register first_reg, second_reg =3D { 0 }; + tic6x_register first_reg, second_reg; bfd_boolean reg_ok; char *rq =3D q; =20 MfG, JBG --=20 Jan-Benedict Glaw jbglaw@lug-owl.de +49-172-7608481 Signature of: Arroganz verk=C3=BCrzt fruchtlose Gespr= =C3=A4che. the second : -- Jan-Benedict Glaw --kA1LkgxZ0NN7Mz3A Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-length: 198 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlJcQ/EACgkQHb1edYOZ4buYYQCcCQslgFIqOQiWQCEY1o57Al5/ e2MAnAnV66A07zI8nAkkFcUu6p8EYT8C =BL+4 -----END PGP SIGNATURE----- --kA1LkgxZ0NN7Mz3A--