Compilation fails on macos-13 runner with error: variable 'i' set but not used [-Werror,-Wunused-but-set-variable]