should be static to avoid warnings

This a local function. It should be static since there is no declaration.