I was using nvcc with the ubuntu g++ compilers, in my case openmpi mpic++. For the "-Wunused-result" of the g++ compiler the corresponding message suppress is "-Wno-unused-result". So passing it in the nvcc like -Xcompiler "-Wno-unused-result" worked for me.