Bug 12861 - gas cr16 fails to build with -Werror and gcc-4.6
Summary: gas cr16 fails to build with -Werror and gcc-4.6
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: gas (show other bugs)
Version: 2.22
: P2 normal
Target Milestone: ---
Assignee: M R Swami Reddy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-09 04:36 UTC by Mike Frysinger
Modified: 2011-06-09 15:46 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Frysinger 2011-06-09 04:36:52 UTC
current cvs head:
gas/config/tc-cr16.c: In function ‘tc_gen_reloc’:
gas/config/tc-cr16.c:525:28: error: variable ‘code’ set but not used [-Werror=unused-but-set-variable]
gas/config/tc-cr16.c: In function ‘check_cinv_options’:
gas/config/tc-cr16.c:1556:31: error: variable ‘d_used’ set but not used [-Werror=unused-but-set-variable]
gas/config/tc-cr16.c:1556:19: error: variable ‘u_used’ set but not used [-Werror=unused-but-set-variable]
gas/config/tc-cr16.c:1556:7: error: variable ‘i_used’ set but not used [-Werror=unused-but-set-variable]
gas/config/tc-cr16.c: In function ‘md_assemble’:
as/config/tc-cr16.c:2507:8: error: variable ‘c’ set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors
Comment 1 Sourceware Commits 2011-06-09 15:43:55 UTC
CVSROOT:	/cvs/src
Module name:	src
Changes by:	nickc@sourceware.org	2011-06-09 15:43:52

Modified files:
	gas            : ChangeLog 
	gas/config     : tc-cr16.c 

Log message:
	PR gas/12861
	* config/tc-cr16.c (tc_gen_reloc): Remove unused local variable
	code.
	(check_cinv_options): Remove unused local variables.  Make
	function void.
	(md_assemble): Remove unused local variable.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/ChangeLog.diff?cvsroot=src&r1=1.4502&r2=1.4503
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/config/tc-cr16.c.diff?cvsroot=src&r1=1.13&r2=1.14
Comment 2 Nick Clifton 2011-06-09 15:46:26 UTC
Hi Mike,

  This should be fixed now.

Cheers
  Nick