Passing pointer to struct : Cannot tell what pointer points to, assuming global memory space

I am passing in a pointer to the struct in code like the following and I am getting a compiler warning in func :: Cannot tell what pointer points to, assuming global memory space. Each thread has this pattern so I assume I do not want this global. Can anyone let me know how I should resolve this problem. I want this to refer to the address of the struct that I declared in the calling function and I passed in.

struct global_variables{
double k,tau,sigma,sigma2,r,delta,b1,e1,b2,e2,b3,e3;
double yv1,yv2,yv3,qv1,tv;
double pe123;
int exp_or_const;
};

device double func(GlobalVariables *g)
{

return (log(b/g->k) + (g->r-g->delta)*g->tv)/g->yv1 + g->yv1/2.0;

}

__device void foo()
{
GlobalVariables g;

// Fill struct
*************** 

// call func
double x = func(&g);

*********

}

Does this error go away if you limit your compilation to sm_20 (Fermi) and later?

I ask because of this thread:[url]visual studio 2010 - Resolving Thrust/CUDA warnings "Cannot tell what pointer points to..." - Stack Overflow

Sorry for the late reply. For some reason the site is not emailing me about replies to posts. You were correct and that did fix the problem.

Thanks!!!