]> git.ipfire.org Git - thirdparty/lldpd.git/commit
check: enforce correct alignment during SNMP tests
authorVincent Bernat <vincent@bernat.im>
Thu, 19 Feb 2015 16:28:00 +0000 (17:28 +0100)
committerVincent Bernat <vincent@bernat.im>
Thu, 19 Feb 2015 16:28:00 +0000 (17:28 +0100)
commit47cd2807872aea1de7ba286156c359a4d0f61f89
treea02c753700cf9262ec599d005f1e37b920612c79
parentc2af3a9cbd02791a3743feaf3c3d41e8921e6f1d
check: enforce correct alignment during SNMP tests

This should fix the following clang error, despite the fact that we know
that the alignment was correct:

```
check_snmp.c:900:9: fatal error: cast from 'u_char *' (aka 'unsigned char *') to
      'unsigned long *' increases required alignment from 1 to 8 [-Wcast-align]
                            *(unsigned long int *)result,
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/check.h:220:22: note: expanded from macro 'fail_unless'
        _fail_unless(expr, __FILE__, __LINE__,\
                     ^
1 error generated.
```
tests/check_snmp.c