crx string overflow warning

gcc8 complains wrongly about the buffer not being large enough, at
least at -Og optimization.

	* crx-dis.c (getregliststring): Allocate a large enough buffer
	to silence false positive gcc8 warning.
This commit is contained in:
Alan Modra 2018-02-24 10:33:33 +10:30
parent 128a19de3d
commit e95b887f85
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2018-02-26 Alan Modra <amodra@gmail.com>
* crx-dis.c (getregliststring): Allocate a large enough buffer
to silence false positive gcc8 warning.
2018-02-22 Shea Levy <shea@shealevy.com>
* disassemble.c (ARCH_riscv): Define if ARCH_all.

View File

@ -244,7 +244,7 @@ powerof2 (int x)
void
getregliststring (int mask, char *string, enum REG_ARG_TYPE core_cop)
{
char temp_string[5];
char temp_string[16];
int i;
string[0] = '{';