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;.
clang-14
FreeBSD 13.1