title: C Format '%d' expects argument of type 'int *' but argument 2 has type 'unsigned int' [-Wformat=]
body: <p>I have some problem about this code , I want to compile this but it's not compile because something wrong. I told about wrong code down there...</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;string.h&gt;
  
  #define MAX 1000                                 
  typedef struct{
      int film_id;
      char title[255];
      char description[1023];
      unsigned int release_year;
      char rental_duration;
      float rental_rate;
      unsigned char length;
      float replacement_cost;
      char rating[10];
      char last_update[30];
  } RECORD_t, *RECORD;                                   
  
  int main(){
      int i,R1;
      char R[1];
      RECORD rec = (RECORD)malloc(sizeof(RECORD_t)*MAX);  
      FILE *file = fopen("data.txt", "rb");               
      if (file == NULL) {                                 
          printf("Cannot open the file.\n");          
          exit(0);                                    
      }                                                   
      fread(rec, sizeof(RECORD_t)*MAX, 1, file);          
      fclose(file);                                       
  
  printf("İd Numarası Giriniz : \n"); 
          scanf("%d",&amp;R1);
          for (i=0; i&lt;1000; i++){
              if (R1 == rec[i].film_id) {
  
              printf("TITLE: %s\n", rec[i].title); printf("Enter New TITLE : "); scanf("%s",rec[i].title);
              printf("DESCRIPTION: %s\n", rec[i].description); printf("Enter New Description : "); scanf("%s",rec[i].description);
  
  // My problem is this line :-------------------
              printf("RELEASE YEAR: %d\n", rec[i].release_year); printf("Enter New RELEASE YEAR : "); scanf("%d",rec[i].release_year);
              printf("RENTAL DURATION: %d\n", rec[i].rental_duration); printf("Enter New RENTAL DURATION : "); scanf("%d",rec[i].rental_duration);
              printf("RENTAL RATE: %f\n", rec[i].rental_rate); printf("Enter New RENTAL RATE : "); scanf("%f",rec[i].rental_rate);
              printf("REPLACEMENT COST: %f\n", rec[i].replacement_cost); printf("Enter New REPLACEMENT COST : "); scanf("%f",rec[i].replacement_cost);
              printf("RATING: %s\n", rec[i].rating); printf("Enter New RATING : "); scanf("%s",rec[i].rating);
              printf("LAST UPDATE: %s\n", rec[i].last_update); printf("Enter New LAST UPDATE : "); scanf("%s",rec[i].last_update);
  
              }
          }
  
      }   
  
  
      file = fopen("data.txt", "wb");                  
      fwrite(rec, sizeof(RECORD_t)*MAX, 1, file);      
      fclose(file);                                    
      free(rec);                                       
      return 1;                                        
  }
  </code></pre>
  
  <p>only int and float variables are not working while I was compile</p>
  
  <pre><code>warning: format ‘%d’ expects argument of type ‘int *’, but argument 2 has type ‘unsigned int’ [-Wformat=]
      printf("RELEASE YEAR: %d\n", rec[i].release_year); printf("Enter New RELEASE YEAR : "); scanf("%d",rec[i].release_year);
      ^
  </code></pre>
  
  <p>Please help me ://</p>