warning: operation on 'ret' may be undefined [-Wsequence-point]