remove warning compilation

remove warning: ‘ret’ may be used uninitialized in this function