silence error: 'mat' may be used uninitialized in this function [-Werror=maybe-uninitialized]
Merge pull request #5264 from fwyzard/silence_maybe_used_uninitialized

silence error: 'mat' may be used uninitialized in this function