Message364919
In file included from /builds/cryptomilk/pam_wrapper/src/python/pypamtest.c:21:
In file included from /usr/include/python3.8/Python.h:147:
In file included from /usr/include/python3.8/abstract.h:837:
/usr/include/python3.8/cpython/abstract.h:91:11: error: cast from 'char *' to 'vectorcallfunc *' (aka 'struct _object *(**)(struct _object *, struct _object *const *, unsigned long, struct _object *)') increases required alignment from 1 to 8 [-Werror,-Wcast-align]
ptr = (vectorcallfunc*)(((char *)callable) + offset);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
The correct way to do it would be:
union {
char *data;
vectorcallfunc *ptr;
} vc;
vc.data = (char *)callable + offset;
return *vc.ptr; |
|
Date |
User |
Action |
Args |
2020-03-24 06:58:12 | asn | set | recipients:
+ asn |
2020-03-24 06:58:12 | asn | set | messageid: <1585033092.63.0.928625583781.issue40052@roundup.psfhosted.org> |
2020-03-24 06:58:12 | asn | link | issue40052 messages |
2020-03-24 06:58:12 | asn | create | |
|