warning: fix 'sport' may be used uninitialized in this function