This pull request fixes the warning issued by `nvc++` (the C++ compiler in Nvidia HPC SDK/PGI), and is similar to pull request #1717.