Fixes #3693: Fix warning in CUDA-aware code.  Missed in earlier merge.

Taken from patch