[config] fix conversion warning
[config] fix missing prototype
[config] add some explicit casts