-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce compiler warnings #95
Comments
Progress (elimination of
|
New gcc 14.x from fedora rawhide turns + /usr/bin/python3 -sBm build -w --no-isolation
* Getting build dependencies for wheel...
Compiling ./dnet.pyx because it changed.
[1/1] Cythonizing ./dnet.pyx
/usr/lib64/python3.8/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /home/tkloczko/rpmbuild/BUILD/libdnet-libdnet-1.17.0/python/dnet.pxd
tree = Parsing.p_module(s, pxd, full_module_name)
warning: dnet.pyx:54:0: Global name __iter_append matched from within class scope in contradiction to to Python 'class private name' rules. This may change in a future release.
warning: dnet.pyx:54:0: Global name __iter_append matched from within class scope in contradiction to to Python 'class private name' rules. This may change in a future release.
warning: dnet.pyx:54:0: Global name __iter_append matched from within class scope in contradiction to to Python 'class private name' rules. This may change in a future release.
warning: dnet.pyx:54:0: Global name __iter_append matched from within class scope in contradiction to to Python 'class private name' rules. This may change in a future release.
warning: dnet.pyx:54:0: Global name __iter_append matched from within class scope in contradiction to to Python 'class private name' rules. This may change in a future release.
warning: dnet.pyx:54:0: Global name __iter_append matched from within class scope in contradiction to to Python 'class private name' rules. This may change in a future release.
warning: dnet.pyx:54:0: Global name __iter_append matched from within class scope in contradiction to to Python 'class private name' rules. This may change in a future release.
warning: dnet.pyx:54:0: Global name __iter_append matched from within class scope in contradiction to to Python 'class private name' rules. This may change in a future release.
running egg_info
creating dnet.egg-info
writing dnet.egg-info/PKG-INFO
writing dependency_links to dnet.egg-info/dependency_links.txt
writing top-level names to dnet.egg-info/top_level.txt
writing manifest file 'dnet.egg-info/SOURCES.txt'
dependency ../include/dnet.h won't be automatically included in the manifest: the path can't have `..` segments
ERROR setuptools_scm._file_finders.git listing git files failed - pretending there aren't any
reading manifest file 'dnet.egg-info/SOURCES.txt'
writing manifest file 'dnet.egg-info/SOURCES.txt'
* Building wheel...
running bdist_wheel
running build
running build_ext
building 'dnet' extension
creating build
creating build/temp.linux-x86_64-cpython-38
/usr/bin/gcc -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -D_GNU_SOURCE -fPIC -fwrapv -ffat-lto-objects -fno-semantic-interposition -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -D_GNU_SOURCE -fPIC -fwrapv -ffat-lto-objects -fno-semantic-interposition -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -D_GNU_SOURCE -fPIC -fwrapv -ffat-lto-objects -fno-semantic-interposition -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -fPIC -I../include -I/usr/include/python3.8 -c ./dnet.c -o build/temp.linux-x86_64-cpython-38/./dnet.o
./dnet.c: In function ‘__pyx_pf_4dnet_3eth_2get’:
./dnet.c:6158:51: warning: pointer targets in passing argument 1 of ‘PyBytes_FromStringAndSize’ differ in signedness [-Wpointer-sign]
6158 | __pyx_t_2 = PyBytes_FromStringAndSize(__pyx_v_ea.data, 6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 122, __pyx_L1_error)
| ~~~~~~~~~~^~~~~
| |
| uint8_t * {aka unsigned char *}
In file included from /usr/include/python3.8/Python.h:96,
from ./dnet.c:50:
/usr/include/python3.8/bytesobject.h:51:50: note: expected ‘const char *’ but argument is of type ‘uint8_t *’ {aka ‘unsigned char *’}
51 | PyAPI_FUNC(PyObject *) PyBytes_FromStringAndSize(const char *, Py_ssize_t);
| ^~~~~~~~~~~~
./dnet.c: In function ‘__pyx_pf_4dnet_3eth_4set’:
./dnet.c:6306:48: warning: pointer targets in passing argument 1 of ‘__pyx_f_4dnet___memcpy’ differ in signedness [-Wpointer-sign]
6306 | __pyx_t_1 = __pyx_f_4dnet___memcpy(__pyx_v_ea.data, __pyx_v_value, 6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error)
| ~~~~~~~~~~^~~~~
| |
| uint8_t * {aka unsigned char *}
./dnet.c:5576:47: note: expected ‘char *’ but argument is of type ‘uint8_t *’ {aka ‘unsigned char *’}
5576 | static PyObject *__pyx_f_4dnet___memcpy(char *__pyx_v_dst, PyObject *__pyx_v_src, int __pyx_v_n) {
| ~~~~~~^~~~~~~~~~~
./dnet.c: In function ‘__pyx_pf_4dnet_2eth_ntoa’:
./dnet.c:6911:48: warning: pointer targets in passing argument 1 of ‘__pyx_f_4dnet___memcpy’ differ in signedness [-Wpointer-sign]
6911 | __pyx_t_1 = __pyx_f_4dnet___memcpy(__pyx_v_ea.data, __pyx_v_buf, 6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 153, __pyx_L1_error)
| ~~~~~~~~~~^~~~~
| |
| uint8_t * {aka unsigned char *}
./dnet.c:5576:47: note: expected ‘char *’ but argument is of type ‘uint8_t *’ {aka ‘unsigned char *’}
5576 | static PyObject *__pyx_f_4dnet___memcpy(char *__pyx_v_dst, PyObject *__pyx_v_src, int __pyx_v_n) {
| ~~~~~~^~~~~~~~~~~
./dnet.c: In function ‘__pyx_pf_4dnet_4eth_aton’:
./dnet.c:7103:51: warning: pointer targets in passing argument 1 of ‘PyBytes_FromStringAndSize’ differ in signedness [-Wpointer-sign]
7103 | __pyx_t_3 = PyBytes_FromStringAndSize(__pyx_v_ea.data, 6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 162, __pyx_L1_error)
| ~~~~~~~~~~^~~~~
| |
| uint8_t * {aka unsigned char *}
/usr/include/python3.8/bytesobject.h:51:50: note: expected ‘const char *’ but argument is of type ‘uint8_t *’ {aka ‘unsigned char *’}
51 | PyAPI_FUNC(PyObject *) PyBytes_FromStringAndSize(const char *, Py_ssize_t);
| ^~~~~~~~~~~~
./dnet.c: In function ‘__pyx_pf_4dnet_6eth_pack_hdr’:
./dnet.c:7330:47: warning: pointer targets in passing argument 1 of ‘__pyx_f_4dnet___memcpy’ differ in signedness [-Wpointer-sign]
7330 | __pyx_t_1 = __pyx_f_4dnet___memcpy(__pyx_v_s.data, __pyx_v_src, 6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __pyx_L1_error)
| ~~~~~~~~~^~~~~
| |
| uint8_t * {aka unsigned char *}
./dnet.c:5576:47: note: expected ‘char *’ but argument is of type ‘uint8_t *’ {aka ‘unsigned char *’}
5576 | static PyObject *__pyx_f_4dnet___memcpy(char *__pyx_v_dst, PyObject *__pyx_v_src, int __pyx_v_n) {
| ~~~~~~^~~~~~~~~~~
./dnet.c:7341:47: warning: pointer targets in passing argument 1 of ‘__pyx_f_4dnet___memcpy’ differ in signedness [-Wpointer-sign]
7341 | __pyx_t_1 = __pyx_f_4dnet___memcpy(__pyx_v_d.data, __pyx_v_dst, 6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 176, __pyx_L1_error)
| ~~~~~~~~~^~~~~
| |
| uint8_t * {aka unsigned char *}
./dnet.c:5576:47: note: expected ‘char *’ but argument is of type ‘uint8_t *’ {aka ‘unsigned char *’}
5576 | static PyObject *__pyx_f_4dnet___memcpy(char *__pyx_v_dst, PyObject *__pyx_v_src, int __pyx_v_n) {
| ~~~~~~^~~~~~~~~~~
./dnet.c: In function ‘__pyx_pf_4dnet_12ip_checksum’:
./dnet.c:8437:3: warning: ‘PyObject_AsReadBuffer’ is deprecated [-Wdeprecated-declarations]
8437 | __pyx_t_1 = (PyObject_AsReadBuffer(__pyx_v_pkt, (&__pyx_v_p), (&__pyx_v_n)) == 0);
| ^~~~~~~~~
In file included from /usr/include/python3.8/Python.h:147:
/usr/include/python3.8/abstract.h:337:17: note: declared here
337 | PyAPI_FUNC(int) PyObject_AsReadBuffer(PyObject *obj,
| ^~~~~~~~~~~~~~~~~~~~~
./dnet.c:8437:52: error: passing argument 2 of ‘PyObject_AsReadBuffer’ from incompatible pointer type [-Wincompatible-pointer-types]
8437 | __pyx_t_1 = (PyObject_AsReadBuffer(__pyx_v_pkt, (&__pyx_v_p), (&__pyx_v_n)) == 0);
| ~^~~~~~~~~~~
| |
| char **
/usr/include/python3.8/abstract.h:338:52: note: expected ‘const void **’ but argument is of type ‘char **’
338 | const void **buffer,
| ~~~~~~~~~~~~~^~~~~~
./dnet.c:8437:66: error: passing argument 3 of ‘PyObject_AsReadBuffer’ from incompatible pointer type [-Wincompatible-pointer-types]
8437 | __pyx_t_1 = (PyObject_AsReadBuffer(__pyx_v_pkt, (&__pyx_v_p), (&__pyx_v_n)) == 0);
| ~^~~~~~~~~~~
| |
| int *
/usr/include/python3.8/abstract.h:339:51: note: expected ‘Py_ssize_t *’ {aka ‘long int *’} but argument is of type ‘int *’
339 | Py_ssize_t *buffer_len);
| ~~~~~~~~~~~~^~~~~~~~~~
./dnet.c: In function ‘__pyx_pf_4dnet_14ip_cksum_add’:
./dnet.c:8729:3: warning: ‘PyObject_AsReadBuffer’ is deprecated [-Wdeprecated-declarations]
8729 | __pyx_t_1 = (PyObject_AsReadBuffer(__pyx_v_buf, (&__pyx_v_p), (&__pyx_v_n)) == 0);
| ^~~~~~~~~
/usr/include/python3.8/abstract.h:337:17: note: declared here
337 | PyAPI_FUNC(int) PyObject_AsReadBuffer(PyObject *obj,
| ^~~~~~~~~~~~~~~~~~~~~
./dnet.c:8729:52: error: passing argument 2 of ‘PyObject_AsReadBuffer’ from incompatible pointer type [-Wincompatible-pointer-types]
8729 | __pyx_t_1 = (PyObject_AsReadBuffer(__pyx_v_buf, (&__pyx_v_p), (&__pyx_v_n)) == 0);
| ~^~~~~~~~~~~
| |
| char **
/usr/include/python3.8/abstract.h:338:52: note: expected ‘const void **’ but argument is of type ‘char **’
338 | const void **buffer,
| ~~~~~~~~~~~~~^~~~~~
./dnet.c:8729:66: error: passing argument 3 of ‘PyObject_AsReadBuffer’ from incompatible pointer type [-Wincompatible-pointer-types]
8729 | __pyx_t_1 = (PyObject_AsReadBuffer(__pyx_v_buf, (&__pyx_v_p), (&__pyx_v_n)) == 0);
| ~^~~~~~~~~~~
| |
| int *
/usr/include/python3.8/abstract.h:339:51: note: expected ‘Py_ssize_t *’ {aka ‘long int *’} but argument is of type ‘int *’
339 | Py_ssize_t *buffer_len);
| ~~~~~~~~~~~~^~~~~~~~~~
In file included from ../include/dnet.h:17,
from ./dnet.c:1222:
./dnet.c: In function ‘__pyx_pf_4dnet_4addr_3eth___get__’:
../include/dnet/addr.h:35:33: warning: pointer targets in passing argument 1 of ‘PyBytes_FromStringAndSize’ differ in signedness [-Wpointer-sign]
35 | #define addr_data8 __addr_u.__data8
./dnet.c:10918:61: note: in expansion of macro ‘addr_data8’
10918 | __pyx_t_3 = PyBytes_FromStringAndSize(__pyx_v_self->_addr.addr_data8, 6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 488, __pyx_L1_error)
| ^~~~~~~~~~
/usr/include/python3.8/bytesobject.h:51:50: note: expected ‘const char *’ but argument is of type ‘uint8_t *’ {aka ‘unsigned char *’}
51 | PyAPI_FUNC(PyObject *) PyBytes_FromStringAndSize(const char *, Py_ssize_t);
| ^~~~~~~~~~~~
./dnet.c: In function ‘__pyx_pf_4dnet_4addr_3eth_2__set__’:
../include/dnet/addr.h:35:33: warning: pointer targets in passing argument 1 of ‘__pyx_f_4dnet___memcpy’ differ in signedness [-Wpointer-sign]
35 | #define addr_data8 __addr_u.__data8
./dnet.c:11025:58: note: in expansion of macro ‘addr_data8’
11025 | __pyx_t_3 = __pyx_f_4dnet___memcpy(__pyx_v_self->_addr.addr_data8, __pyx_v_value, 6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 493, __pyx_L1_error)
| ^~~~~~~~~~
./dnet.c:5576:47: note: expected ‘char *’ but argument is of type ‘uint8_t *’ {aka ‘unsigned char *’}
5576 | static PyObject *__pyx_f_4dnet___memcpy(char *__pyx_v_dst, PyObject *__pyx_v_src, int __pyx_v_n) {
| ~~~~~~^~~~~~~~~~~
./dnet.c: In function ‘__pyx_pf_4dnet_4addr_2ip___get__’:
../include/dnet/addr.h:35:33: warning: pointer targets in passing argument 1 of ‘PyBytes_FromStringAndSize’ differ in signedness [-Wpointer-sign]
35 | #define addr_data8 __addr_u.__data8
./dnet.c:11157:61: note: in expansion of macro ‘addr_data8’
11157 | __pyx_t_3 = PyBytes_FromStringAndSize(__pyx_v_self->_addr.addr_data8, 4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 502, __pyx_L1_error)
| ^~~~~~~~~~
/usr/include/python3.8/bytesobject.h:51:50: note: expected ‘const char *’ but argument is of type ‘uint8_t *’ {aka ‘unsigned char *’}
51 | PyAPI_FUNC(PyObject *) PyBytes_FromStringAndSize(const char *, Py_ssize_t);
| ^~~~~~~~~~~~
./dnet.c: In function ‘__pyx_pf_4dnet_4addr_2ip_2__set__’:
../include/dnet/addr.h:35:33: warning: pointer targets in passing argument 1 of ‘__pyx_f_4dnet___memcpy’ differ in signedness [-Wpointer-sign]
35 | #define addr_data8 __addr_u.__data8
./dnet.c:11323:60: note: in expansion of macro ‘addr_data8’
11323 | __pyx_t_4 = __pyx_f_4dnet___memcpy(__pyx_v_self->_addr.addr_data8, __pyx_v_value, 4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 513, __pyx_L1_error)
| ^~~~~~~~~~
./dnet.c:5576:47: note: expected ‘char *’ but argument is of type ‘uint8_t *’ {aka ‘unsigned char *’}
5576 | static PyObject *__pyx_f_4dnet___memcpy(char *__pyx_v_dst, PyObject *__pyx_v_src, int __pyx_v_n) {
| ~~~~~~^~~~~~~~~~~
./dnet.c: In function ‘__pyx_pf_4dnet_4addr_3ip6___get__’:
../include/dnet/addr.h:35:33: warning: pointer targets in passing argument 1 of ‘PyBytes_FromStringAndSize’ differ in signedness [-Wpointer-sign]
35 | #define addr_data8 __addr_u.__data8
./dnet.c:11457:61: note: in expansion of macro ‘addr_data8’
11457 | __pyx_t_3 = PyBytes_FromStringAndSize(__pyx_v_self->_addr.addr_data8, 16); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 522, __pyx_L1_error)
| ^~~~~~~~~~
/usr/include/python3.8/bytesobject.h:51:50: note: expected ‘const char *’ but argument is of type ‘uint8_t *’ {aka ‘unsigned char *’}
51 | PyAPI_FUNC(PyObject *) PyBytes_FromStringAndSize(const char *, Py_ssize_t);
| ^~~~~~~~~~~~
./dnet.c: In function ‘__pyx_pf_4dnet_4addr_3ip6_2__set__’:
../include/dnet/addr.h:35:33: warning: pointer targets in passing argument 1 of ‘__pyx_f_4dnet___memcpy’ differ in signedness [-Wpointer-sign]
35 | #define addr_data8 __addr_u.__data8
./dnet.c:11564:58: note: in expansion of macro ‘addr_data8’
11564 | __pyx_t_3 = __pyx_f_4dnet___memcpy(__pyx_v_self->_addr.addr_data8, __pyx_v_value, 16); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 527, __pyx_L1_error)
| ^~~~~~~~~~
./dnet.c:5576:47: note: expected ‘char *’ but argument is of type ‘uint8_t *’ {aka ‘unsigned char *’}
5576 | static PyObject *__pyx_f_4dnet___memcpy(char *__pyx_v_dst, PyObject *__pyx_v_src, int __pyx_v_n) {
| ~~~~~~^~~~~~~~~~~
./dnet.c: In function ‘__pyx_pf_4dnet_3arp_8loop’:
./dnet.c:15478:64: error: passing argument 2 of ‘arp_loop’ from incompatible pointer type [-Wincompatible-pointer-types]
15478 | __pyx_t_1 = __Pyx_PyInt_From_int(arp_loop(__pyx_v_self->arp, __pyx_f_4dnet___arp_callback, ((void *)__pyx_v__arg))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 760, __pyx_L1_error)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int (*)(struct arp_entry *, void *)
In file included from ../include/dnet.h:18:
../include/dnet/arp.h:101:43: note: expected ‘arp_handler’ {aka ‘int (*)(const struct arp_entry *, void *)’} but argument is of type ‘int (*)(struct arp_entry *, void *)’
101 | int arp_loop(arp_t *arp, arp_handler callback, void *arg);
| ~~~~~~~~~~~~^~~~~~~~
./dnet.c: In function ‘__pyx_pf_4dnet_28arp_pack_hdr_ethip’:
./dnet.c:16141:48: warning: pointer targets in passing argument 1 of ‘__pyx_f_4dnet___memcpy’ differ in signedness [-Wpointer-sign]
16141 | __pyx_t_1 = __pyx_f_4dnet___memcpy(__pyx_v_sh.data, __pyx_v_sha, 6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 786, __pyx_L1_error)
| ~~~~~~~~~~^~~~~
| |
| uint8_t * {aka unsigned char *}
./dnet.c:5576:47: note: expected ‘char *’ but argument is of type ‘uint8_t *’ {aka ‘unsigned char *’}
5576 | static PyObject *__pyx_f_4dnet___memcpy(char *__pyx_v_dst, PyObject *__pyx_v_src, int __pyx_v_n) {
| ~~~~~~^~~~~~~~~~~
./dnet.c:16152:48: warning: pointer targets in passing argument 1 of ‘__pyx_f_4dnet___memcpy’ differ in signedness [-Wpointer-sign]
16152 | __pyx_t_1 = __pyx_f_4dnet___memcpy(__pyx_v_dh.data, __pyx_v_dha, 6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 787, __pyx_L1_error)
| ~~~~~~~~~~^~~~~
| |
| uint8_t * {aka unsigned char *}
./dnet.c:5576:47: note: expected ‘char *’ but argument is of type ‘uint8_t *’ {aka ‘unsigned char *’}
5576 | static PyObject *__pyx_f_4dnet___memcpy(char *__pyx_v_dst, PyObject *__pyx_v_src, int __pyx_v_n) {
| ~~~~~~^~~~~~~~~~~
./dnet.c: In function ‘__pyx_pf_4dnet_4intf_10loop’:
./dnet.c:18820:66: error: passing argument 2 of ‘intf_loop’ from incompatible pointer type [-Wincompatible-pointer-types]
18820 | __pyx_t_1 = __Pyx_PyInt_From_int(intf_loop(__pyx_v_self->intf, __pyx_f_4dnet___intf_callback, ((void *)__pyx_v__arg))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1060, __pyx_L1_error)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int (*)(struct intf_entry *, void *)
In file included from ../include/dnet.h:25:
../include/dnet/intf.h:64:44: note: expected ‘intf_handler’ {aka ‘int (*)(const struct intf_entry *, void *)’} but argument is of type ‘int (*)(struct intf_entry *, void *)’
64 | int intf_loop(intf_t *i, intf_handler callback, void *arg);
| ~~~~~~~~~~~~~^~~~~~~~
./dnet.c: In function ‘__pyx_pf_4dnet_5route_8loop’:
./dnet.c:20336:68: error: passing argument 2 of ‘route_loop’ from incompatible pointer type [-Wincompatible-pointer-types]
20336 | __pyx_t_1 = __Pyx_PyInt_From_int(route_loop(__pyx_v_self->route, __pyx_f_4dnet___route_callback, ((void *)__pyx_v__arg))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1159, __pyx_L1_error)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int (*)(struct route_entry *, void *)
In file included from ../include/dnet.h:26:
../include/dnet/route.h:34:47: note: expected ‘route_handler’ {aka ‘int (*)(const struct route_entry *, void *)’} but argument is of type ‘int (*)(struct route_entry *, void *)’
34 | int route_loop(route_t *r, route_handler callback, void *arg);
| ~~~~~~~~~~~~~~^~~~~~~~
./dnet.c: In function ‘__pyx_pf_4dnet_2fw_6loop’:
./dnet.c:22262:62: error: passing argument 2 of ‘fw_loop’ from incompatible pointer type [-Wincompatible-pointer-types]
22262 | __pyx_t_1 = __Pyx_PyInt_From_int(fw_loop(__pyx_v_self->fw, __pyx_f_4dnet___fw_callback, ((void *)__pyx_v__arg))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1295, __pyx_L1_error)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int (*)(struct fw_rule *, void *)
In file included from ../include/dnet.h:27:
../include/dnet/fw.h:50:38: note: expected ‘fw_handler’ {aka ‘int (*)(const struct fw_rule *, void *)’} but argument is of type ‘int (*)(struct fw_rule *, void *)’
50 | int fw_loop(fw_t *f, fw_handler callback, void *arg);
| ~~~~~~~~~~~^~~~~~~~
error: command '/usr/bin/gcc' failed with exit code 1 |
I can confirm this observation - it's going to require a lot of type casting, but since the code is generated from Cython, this is going to be a bit more difficult. :-( If there is anyone out there who has experience and can look into it, it would be appreciated! |
BTW. I think we should spin this off into a separate issue. |
As discussed in #63 - there are additional warnings that should be addressed:
As of
2023-11-06
:The text was updated successfully, but these errors were encountered: