We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
src/annoymodule.cc:182:12: error: cast from pointer to smaller type 'int' loses information return (int) NULL; ^~~~~~~~~~
NULL can't be converted to integer because it is a pointer.
In fact, this function call and comparison are meaningless:
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i|s", (char**)kwlist, &f, &metric)) return (int) NULL; return 0;
You can replace this code with return 0;.
return 0;
clang-14 FreeBSD 13.1
The text was updated successfully, but these errors were encountered:
I've got the same error when building with clang-18 on FreeBSD 13.4.
The correct fix seems to be to return -1, see this discussion on initproc return value.
Also -1 is used in example from official documentation.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
NULL can't be converted to integer because it is a pointer.
In fact, this function call and comparison are meaningless:
You can replace this code with
return 0;
.clang-14
FreeBSD 13.1
The text was updated successfully, but these errors were encountered: