Avoid sequence point warning in h8300 sim
GCC gives a -Wsequence-point warning for this code in the h8300 sim. The bug is that memory_size is both assigned and used in the same expression. The fix is to assign after the print. sim/h8300/ChangeLog 2021-04-08 Tom Tromey <tom@tromey.com> * compile.c (init_pointers): Fix sequence point warning.
This commit is contained in:
parent
32a046ab0d
commit
06a88b3b39
@ -1,3 +1,7 @@
|
|||||||
|
2021-04-08 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
|
* compile.c (init_pointers): Fix sequence point warning.
|
||||||
|
|
||||||
2021-04-08 Tom Tromey <tom@tromey.com>
|
2021-04-08 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
* compile.c (cmdline_location): Use new-style declaration.
|
* compile.c (cmdline_location): Use new-style declaration.
|
||||||
|
@ -1624,7 +1624,8 @@ init_pointers (SIM_DESC sd)
|
|||||||
sim_io_printf
|
sim_io_printf
|
||||||
(sd,
|
(sd,
|
||||||
"init_pointers: bad memory size %d, defaulting to %d.\n",
|
"init_pointers: bad memory size %d, defaulting to %d.\n",
|
||||||
memory_size, memory_size = H8300S_MSIZE);
|
memory_size, H8300S_MSIZE);
|
||||||
|
memory_size = H8300S_MSIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (h8_get_memory_buf (sd))
|
if (h8_get_memory_buf (sd))
|
||||||
|
Loading…
Reference in New Issue
Block a user