Solved warning by adding prototypes