* sim-core.h (sim_cpu_core): [WITH_XOR_ENDIAN + 1], to avoid
authorFelix Lee <flee@cygnus>
Wed, 10 Sep 1997 04:46:37 +0000 (04:46 +0000)
committerFelix Lee <flee@cygnus>
Wed, 10 Sep 1997 04:46:37 +0000 (04:46 +0000)
illegal zero-sized array.
* sim-core.c (sim_core_xor_read_buffer): same.

sim/common/ChangeLog
sim/common/sim-core.c

index 93476e7540882902a25fb3430023082b0b589cce..8c2db641410b84c7eb4557539770f5f67daf3d83 100644 (file)
@@ -1,3 +1,9 @@
+Tue Sep  9 21:46:46 1997  Felix Lee  <flee@cygnus.com>
+
+       * sim-core.h (sim_cpu_core): [WITH_XOR_ENDIAN + 1], to avoid
+       illegal zero-sized array.
+       * sim-core.c (sim_core_xor_read_buffer): same.
+
 Tue Sep  9 11:20:35 1997  Doug Evans  <dje@canuck.cygnus.com>
 
        * nltvals.def: Regenerate.
index 9c49fed3419ecb63ead607c9b861757f2ba55b3f..079c96496a872cbc01ea14bc312b871ffe3ab5ad 100644 (file)
@@ -660,7 +660,7 @@ sim_core_xor_read_buffer (SIM_DESC sd,
   else
     /* only break up transfers when xor-endian is both selected and enabled */
     {
-      unsigned_1 x[WITH_XOR_ENDIAN];
+      unsigned_1 x[WITH_XOR_ENDIAN + 1]; /* +1 to avoid zero-sized array */
       unsigned nr_transfered = 0;
       address_word start = addr;
       unsigned nr_this_transfer = (WITH_XOR_ENDIAN - (addr & ~(WITH_XOR_ENDIAN - 1)));
This page took 0.030408 seconds and 4 git commands to generate.