]> git.ipfire.org Git - thirdparty/suricata.git/commit
modbus: fix compiler warnings about alignment
authorVictor Julien <victor@inliniac.net>
Wed, 5 Apr 2017 19:19:33 +0000 (15:19 -0400)
committerVictor Julien <victor@inliniac.net>
Thu, 6 Apr 2017 07:09:29 +0000 (09:09 +0200)
commitb134dfcce71ae6a5ae45bf1ce2e47d024e0d3a7a
tree8c51611e97347ee3d387a0a6b229da783f76ead1
parente1bf48c0ee89d16b2fc0867b4958dbad814b55ec
modbus: fix compiler warnings about alignment

app-layer-modbus.c:1226:39: warning: taking address of packed member 'transactionId' of class or structure 'ModbusHeader_' may result in an unaligned pointer value [-Waddress-of-packed-member]
    if (ModbusExtractUint16(modbus, &(header->transactionId), input, input_len, &offset)    ||
                                      ^~~~~~~~~~~~~~~~~~~~~
app-layer-modbus.c:1228:39: warning: taking address of packed member 'protocolId' of class or structure 'ModbusHeader_' may result in an unaligned pointer value [-Waddress-of-packed-member]
        ModbusExtractUint16(modbus, &(header->protocolId), input, input_len, &offset)       ||
                                      ^~~~~~~~~~~~~~~~~~
app-layer-modbus.c:1230:39: warning: taking address of packed member 'length' of class or structure 'ModbusHeader_' may result in an unaligned pointer value [-Waddress-of-packed-member]
        ModbusExtractUint16(modbus, &(header->length), input, input_len, &offset)           ||
                                      ^~~~~~~~~~~~~~
3 warnings generated.

Bug #2088
src/app-layer-modbus.c