]> git.ozlabs.org Git - ccan/commit
configurator: fix bad code in HAVE_UNALIGNED_ACCESS detection.
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 13 Oct 2025 03:19:56 +0000 (13:49 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 13 Oct 2025 03:20:56 +0000 (13:50 +1030)
commitea141afa296c7cbb031e81188d132edef461ccf3
tree9e135e61e72f6b0e57fce821121e62c3354800cd
parentc4760b306a06a8fe3c6690002f6b54bd3cfa9449
configurator: fix bad code in HAVE_UNALIGNED_ACCESS detection.

Reported on armhf, but applies to any 32-bit platform (detected at -O2 or above)

```
$ arm-linux-gnueabihf-gcc-13 -O2 -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -c /tmp/foo.c -Wall
/tmp/foo.c: In function ‘main’:
/tmp/foo.c:4:23: error: expected expression before ‘int’
    4 |      char pad[sizeof(*int) * 1];
      |                       ^~~
/tmp/foo.c:4:11: warning: unused variable ‘pad’ [-Wunused-variable]
    4 |      char pad[sizeof(*int) * 1];
      |           ^~~
```

Reported-by: https://github.com/Raimo33
Fixes: https://github.com/ElementsProject/lightning/issues/8501
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
tools/configurator/configurator.c