Fix some gcc compiler warnings
Fix gcc error regarding static functions/declarations