mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
deactivate stric-aliasing for cast
Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
This commit is contained in:
parent
c84df46d9e
commit
a5991bc794
1 changed files with 3 additions and 0 deletions
|
@ -150,7 +150,10 @@ void readFromDmaToStdOut(std::shared_ptr<villas::fpga::ip::Dma> dma,
|
|||
try {
|
||||
for (size_t i = 0; i*4 < c.bytes; i++) {
|
||||
int32_t ival = mem[cur][i];
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
|
||||
float fval = *((float*)(&ival)); // cppcheck-suppress invalidPointerCast
|
||||
#pragma GCC diagnostic pop
|
||||
formatter->format(fval);
|
||||
printf("%#x\n", ival);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue