Small correction in the docstring of polyfit. As mentionned in Issue 3640, the notes were wrong in the order of the index for p.
FIX: wrong function types in ufunc_object.c

assign_reduce_identity_{zero,one} were treated as
PyArray_AssignReduceIdentityFunc, but that type has
an extra void* argument. Added the argument.
FIX: remove unused variables and add casts

Makes the build complete with fewer warnings.
MAINT: ignore some more generated C files.
Merge pull request #3653 from larsmans/c-fixes

FIX: call through wrong function pointer type + minor stuff
Merge pull request #3651 from MatthieuDartiailh/polyfit_doc

Small correction in the docstring of polyfit.
FIX: unchecked mallocs and Python operations

Rewrote _tmp_string_t handling in buffer.c to use the fact that
realloc(NULL, n) is equivalent to malloc(n). There are still some
unchecked cases in this file.

Also changed some arguments to const and removed casts on malloc
return values; malloc returns void*, which is converted to any
other pointer automatically. Casting the return value of malloc
is more likely to hide bugs than to fix anything.
MAINT: remove unused goto label and useless casts
FIX: some more casts in ufunc_object

Introduced a helper function to get rid of repetitive code.
FIX don't explicitly cast void* when final type is known
Merge pull request #3655 from larsmans/c-fixes

FIX: unchecked mallocs and various other things