Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@clan
Copy link

@clan clan commented Feb 19, 2025

See https://bugs.gentoo.org/933360, clang 19 has same problem too

…ompiler

which is error now, see https://bugs.gentoo.org/933360,
clang 19 (maybe earlier) has the same problem too

Signed-off-by: Z. Liu <[email protected]>
@clan clan force-pushed the incompatible-pointer-types branch from d20e067 to de57a23 Compare February 19, 2025 04:13
@clan clan changed the title python/dnet.pyx: fix incompatible-pointer-types for modern compiler python/dnet.pyx: fix incompatible-function-pointer-types for modern compiler Feb 19, 2025
./dnet.c:8451:52: error: passing argument 2 of ‘PyObject_AsReadBuffer’ from incompatible pointer type [-Wincompatible-pointer-types]
 8451 |   __pyx_t_1 = (PyObject_AsReadBuffer(__pyx_v_pkt, (&__pyx_v_p), (&__pyx_v_n)) == 0);
      |                                                   ~^~~~~~~~~~~
      |                                                    |
      |                                                    char **
/usr/include/python3.12/abstract.h:370:52: note: expected ‘const void **’ but argument is of type ‘char **’
  370 |                                       const void **buffer,
      |                                       ~~~~~~~~~~~~~^~~~~~
./dnet.c:8451:66: error: passing argument 3 of ‘PyObject_AsReadBuffer’ from incompatible pointer type [-Wincompatible-pointer-types]
 8451 |   __pyx_t_1 = (PyObject_AsReadBuffer(__pyx_v_pkt, (&__pyx_v_p), (&__pyx_v_n)) == 0);
      |                                                                 ~^~~~~~~~~~~
      |                                                                  |
      |                                                                  int *
/usr/include/python3.12/abstract.h:371:51: note: expected ‘Py_ssize_t *’ {aka ‘long int *’} but argument is of type ‘int *’
  371 |                                       Py_ssize_t *buffer_len);
      |                                       ~~~~~~~~~~~~^~~~~~~~~~

Signed-off-by: Z. Liu <[email protected]>
@clan
Copy link
Author

clan commented Apr 3, 2025

ping

@ofalk
Copy link
Owner

ofalk commented Apr 3, 2025

ping

Thanks for the nudge. Looks good, I'll merge it.

@ofalk ofalk merged commit 3463e6e into ofalk:devel Apr 3, 2025
6 checks passed
@ofalk ofalk mentioned this pull request Apr 3, 2025
@clan clan deleted the incompatible-pointer-types branch April 5, 2025 01:36
ofalk added a commit that referenced this pull request Jul 13, 2025
* Encoding fixes
* CI Config (a few iterations) w/ Ubuntu and Windows target
* Typo fixes
* Fixes in icmp.h (#100 #101) - wrong size of fields for icmp4 timestamp message / 16bits are enough for Id/Seq.
* Fix payload size of Netlink message (#99) - The `len` parameter of `NLMSG_LENGTH`  was size of Netlink header instead of RtNetlink header.
* python/dnet.pyx: fix incompatible-function-pointer-types for modern compiler (#104)
* Cythonize with latest Cython (3.1)
* Fix #109 PF_PACKET support detection to failure
* tree-wide: regenerate autotools files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants