My project requires me to allocate memory dynamically. What am I doing wrong?

```
/*Setting up my Struture*/
struct album_ {
  int num_tracks;
  struct tracks_ tracks;
  int playlist_hits[];
};
typedef struct album_ album;

/*Try to allocate memory for structure*/

fscanf(album_file,"%d", &number_of_album);

  album *all_albums_p = (album *)malloc(sizeof(album)*number_of_album);

  for(i=0;i < number_of_album; i++){
    all_albums_p[i].num_tracks = (int *)malloc(sizeof(int));
    all_albums_p[i].num_tracks = i+1;
    printf("%d\n",all_albums_p[i].num_tracks);
  }

Error Message
warning: assignment makes integer from pointer without a cast [enabled by default]

```

Also if I wanted to return this array is it correct to `return all_albums_p`?