fix warning: function declaration isn't a prototype