[config] update makefile
[config] fix compiler warnings
[config] remove duplicate if else branch
[config] fix allocater mismatches
[config] remove dead code
[config] fix build: define global variable
[config] fix conversion warning
[config] fix missing prototype
[config] add some explicit casts
[config] add some const qualifiers
[config] fix possible memory leaks
[config] remove unused function 'AssignIgnore_Global'
[config] qualify some void pointers
[config] add some nonnull qualifiers
[config] fix CID 28481: pass big struct by pointer
[config] fix CID 28451: exit on memory error
[config] fix CID 28522: close dir on return
[config] fix build, introduced by 07de3553dc91bbfb61347354fd85f35cbf90b206
[config] add const qualifiers
[config] fix clang analyzer warning