Mac M1 build fails

I have QGC build fail with following error on my Mac M1 (apple chip). Same machine builds for android.

/Users/corrado/QGC/qgroundcontrol_mshuav/src/QtLocationPlugin/QGCTileCacheWorker.cpp:510: error: variable ‘tileCount’ set but not used [-Werror,-Wunused-but-set-variable]
/Users/corrado/QGC/qgroundcontrol_mshuav/src/QtLocationPlugin/QGCTileCacheWorker.cpp:510:21: error: variable ‘tileCount’ set but not used [-Werror,-Wunused-but-set-variable]
quint64 tileCount = 0;
^