Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I meet problems like this when I use clang:
[ 75s] src/dmidecodemodule.c:916:28: error: incompatible function pointer types initializing 'PyCFunction' (aka 'struct _object ()(struct _object *, struct _object *)') with an expression of type 'PyObject *(PyObject *, PyObject *, PyObject *)' (aka 'struct _object *(struct _object *, struct _object *, struct _object *)') [-Wincompatible-function-pointer-types]
[ 75s] 916 | {(char *)"xmlapi", dmidecode_xmlapi, METH_VARARGS | METH_KEYWORDS,
[ 75s] | ^~~~~~~~~~~~~~~~
[ 75s] src/dmidecodemodule.c:997:9: warning: 'xmlXPathInit' is deprecated [-Wdeprecated-declarations]
[ 75s] 997 | xmlXPathInit();
[ 75s] | ^
[ 75s] /usr/include/libxml2/libxml/xpath.h:562:1: note: 'xmlXPathInit' has been explicitly marked deprecated here
[ 75s] 562 | XML_DEPRECATED
[ 75s] | ^
[ 75s] /usr/include/libxml2/libxml/xmlversion.h:447:43: note: expanded from macro 'XML_DEPRECATED'
[ 75s] 447 | # define XML_DEPRECATED attribute((deprecated))
[ 75s] | ^
[ 75s] src/dmidecodemodule.c:1027:72: error: incompatible function pointer types passing 'void (void )' to parameter of type 'PyCapsule_Destructor' (aka 'void ()(struct _object *)') [-Wincompatible-function-pointer-types]
[ 75s] 1027 | PyModule_AddObject(module, "options", PyCapsule_New(opt, NULL, destruct_options));
[ 75s] | ^~~~~~~~~~~~~~~~
[ 75s] /usr/include/python3.11/pycapsule.h:31:26: note: passing argument to parameter 'destructor' here
[ 75s] 31 | PyCapsule_Destructor destructor);
[ 75s] | ^
[ 75s] 5 warnings and 2 errors generated.
so i did some change