HI ALL,

i have written some code of line as

typedef struct _nodeList
{
   unsigned int pointCode; 
   struct NodeList *next;
}NodeList;
typedef unsigned int  PointCode ;
int right_configuration(NodeList *head,PointCode x, PointCode y)
{
   NodeList *node1;
   NodeList *node = head;
   int k =0;
   unsigned int NodePoint[100];
   node1 = (NodeList *)malloc(sizeof(NodeList));
   node1->pointCode= y;
            while(node->next)  /*store point codes before x */  
            {
               if(node->pointCode != x)
                  NodePoint[k]  = node->pointCode;  
               k++; 
               node = node->next; /* warning 1 */
            }
            node->next = node1; /* warning 2*/
}

in above code(function right_configuration is called from somewherelse) whn i compile my gcc compiler give this warning
warning1: assignment from incompatible pointer type
warning2: assignment from incompatible pointer type

why i am getting these warning here? i am not able to identify..
plz guide me

The only problems I found were:
1. The structure next was incorrect

typedef struct _nodeList
{
   unsigned int pointCode; 
   struct _nodeList *next;
}NodeList;

2. right_configuration() must return a value.

Thankx buddy..
yes that was a mistake i couldn't see.
thankx a lot again

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.