I am compiling my code with CUDA 2.2 and this error keeps popping up, although program execution is still the same (no bugs appearing):
Material.cuh(160): warning: expression has no effect
It is referring to the line: sr[zero] = originalSR;
Does anyone know what it’s saying that? There are two more warnings which seem to be when a ShadeRec is assigned another. Is it because it can’t find a copy constructor or something? How do I get rid of this warning.
[codebox]device RGBColour shade2(ShadeRec& originalSR, const RGBColour& backgroundColour)
float3 wo, wi, wt; RGBColour fr, ft; ShadeRec sr; Ray newRays; Ray currRays; RGBColour srC; volatile int idx = threadIdx.y*blockDim.x + threadIdx.x; volatile int zero = 0; volatile int one = 1; volatile int three = 3; sr[zero] = originalSR;[/codebox]