Silenced warning with casting