Merge topic 'gcc12-warning'

ae101921e8 Source: Avoid gcc 12 compilation warning

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6916