From ad5655e60c01b6e4590e86f3959ab48c77d896a3 Mon Sep 17 00:00:00 2001 From: James Le Cuirot Date: Mon, 15 Nov 2021 22:24:00 +0000 Subject: [PATCH] Fix GCC -Waddress warning in PlayCamera MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GCC 11 says: Sources/Entities/Camera.es:397:10: warning: the compiler can assume that the address of ‘cm’ will never be NULL [-Waddress] The MP version of Camera.es simply checks m_penTarget instead, so that's what I've done here. It's not clear what the intention of the original code was. --- Sources/Entities/Camera.es | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Sources/Entities/Camera.es b/Sources/Entities/Camera.es index aa547bb..afb5b57 100644 --- a/Sources/Entities/Camera.es +++ b/Sources/Entities/Camera.es @@ -391,10 +391,8 @@ procedures: // determine camera type and jump to corresponding routine PlayCamera() { - // eventually add to movers list - CCameraMarker &cm = (CCameraMarker&)*m_penTarget; // if we have at least one marker - if( &cm!=NULL) { + if( m_penTarget!=NULL) { // treat camera as movable jump PlayMovingCamera(); // if there isn't any markers