Commit 8bb8be2d9f5d34748d3a99c4c561492e5b3f8fcc

Authored by Stéphane Raimbault
1 parent 9782a304

Add comment about fix alignment problem

Showing 1 changed file with 2 additions and 0 deletions
tests/unit-test-client.c
... ... @@ -325,6 +325,8 @@ int main(int argc, char *argv[])
325 325 tab_rp_registers[0] == (UT_IREAL & 0xFFFF)) {
326 326 printf("OK\n");
327 327 } else {
  328 + /* Avoid *((uint32_t *)tab_rp_registers)
  329 + * https://github.com/stephane/libmodbus/pull/104 */
328 330 ireal = (uint32_t) tab_rp_registers[0] & 0xFFFF;
329 331 ireal |= (uint32_t) tab_rp_registers[1] << 16;
330 332 printf("FAILED (%x != %x)\n", ireal, UT_IREAL);
... ...