From: Robert Schwebel Date: Sat, 12 Jun 2004 21:04:47 +0200 Subject: [U-Boot-Users] [PATCH] fix compilation for gcc 2.95 Message-ID: <20040612190447.GG12815@pengutronix.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de This makes the code compile with gcc-2.95 again. Changelog is in patch, please apply. Robert -- Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de Pengutronix - Linux Solutions for Science and Industry Handelsregister: Amtsgericht Hildesheim, HRA 2686 Hornemannstra?e 12, 31137 Hildesheim, Germany Phone: +49-5121-28619-0 | Fax: +49-5121-28619-4 -------------- next part -------------- # # Author: Robert Schwebel # # Description: Changelog Entry: # # * Patch by Robert Schwebel, 12 June 2004: # variable declaration is not allowed outside # declaration part (breaks for gcc < 3) # # State: 2004-06-12: submitted # diff -urN u-boot-maintainance/common/cmd_jffs2.c u-boot-maintainance-gcc34/common/cmd_jffs2.c --- u-boot-maintainance/common/cmd_jffs2.c 2004-06-12 16:03:12.000000000 +0200 +++ u-boot-maintainance-gcc34/common/cmd_jffs2.c 2004-06-12 16:02:39.000000000 +0200 @@ -127,15 +127,16 @@ char *fsname; char *filename; + ulong offset; + int size; + struct part_info *part; /* pre-set Boot file name */ if ((filename = getenv("bootfile")) == NULL) { filename = "uImage"; } - ulong offset = load_addr; - int size; - struct part_info *part; + offset = load_addr; if (argc == 2) { filename = argv[1];