Warning assignment from incompatible pointer type while assiging to another parameter : In my code i'm getting this warning  while compiling.
I tried to fix this my i'm unable to solve this issue.

      static uint8_t tx_data;

     int *recvdata2,*recvdata;
     recvdata= str2int(tx_data); //warning assignment from incompatible pointer type
    recvdata2=(uint8_t*)&recvdata

str2int is a function to convert the string to integer.

       int str2int(char *str)
    {
    	int res=0;
    	int i;
    	for ( i = 0; str[i] != '\0'; ++i)
    	res=(res)*10+str[i]-'0';
    	return res;
    }

I'm a noobie to this. Please help me to fix this issue.
Any help will be appreciated.