Yes it is hard work to make your code compile clean (compared to what some other compilers' will let you get away with), but for the vast majority of the time, they tell you something you need to take care of. For example, using an uninitialised value would be very bad.

2. Use much better names than function1() and function2(). That tells me nothing about what is going on.

Personally, I would suggest you begin by reading each line of the file using fgets(), then use another function to look for say '[' in that line.