test2.c:8:1: warning: data definition has no type or storage class
file1 = fopen(filename1, "rb");
^
test2.c:8:1: warning: type defaults to ‘int’ in declaration of ‘file1’ [-Wimplicit-int]
test2.c:8:1: error: conflicting types for ‘file1’
test2.c:4:7: note: previous declaration of ‘file1’ was here
FILE *file1;
^
test2.c:8:9: warning: initialization makes integer from pointer without a cast
file1 = fopen(filename1, "rb");
^
test2.c:8:1: error: initializer element is not constant
file1 = fopen(filename1, "rb");
^
test2.c:9:1: error: expected identifier or ‘(’ before ‘if’
if (file1)
^
test2.c:19:1: error: expected identifier or ‘(’ before ‘else’
else
^