prog.c: In function 'main':
prog.c:18:36: error: macro "strncmp" requires 3 arguments, but only 2 given
if(strncmp(argv[i],"-c")==0)
^
prog.c:18:37: warning: the comparison will always evaluate as 'false' for the address of 'strncmp' will never be NULL [-Waddress]
if(strncmp(argv[i],"-c")==0)
^
prog.c:20:41: error: macro "strncmp" requires 3 arguments, but only 2 given
else if(strncmp(argv[i],"-w")==0)
^
prog.c:20:42: warning: the comparison will always evaluate as 'false' for the address of 'strncmp' will never be NULL [-Waddress]
else if(strncmp(argv[i],"-w")==0)
^
prog.c:22:41: error: macro "strncmp" requires 3 arguments, but only 2 given
else if(strncmp(argv[i],"-l")==0)
^
prog.c:22:42: warning: the comparison will always evaluate as 'false' for the address of 'strncmp' will never be NULL [-Waddress]
else if(strncmp(argv[i],"-l")==0)
^
prog.c:24:41: error: macro "strncmp" requires 3 arguments, but only 2 given
else if(strncmp(argv[i],"wc")==0)
^
prog.c:24:42: warning: the comparison will always evaluate as 'false' for the address of 'strncmp' will never be NULL [-Waddress]
else if(strncmp(argv[i],"wc")==0)
^
prog.c:27:21: error: 'arv' undeclared (first use in this function)
fname = arv[i];
^
prog.c:27:21: note: each undeclared identifier is reported only once for each function it appears in
prog.c:29:5: error: unknown type name 'File'
File *fp ;
^
prog.c:30:8: warning: assignment from incompatible pointer type
fp = fopen(fname,"r");
^
prog.c:31:10: error: conflicting types for 'c'
char c;
^
prog.c:10:9: note: previous definition of 'c' was here
int c=0,l=0,w=0;
^
In file included from prog.c:1:0:
prog.c:34:20: warning: passing argument 1 of '_IO_getc' from incompatible pointer type
while( (c=getc(fp))!= 'EOF')
^
In file included from /usr/include/stdio.h:74:0,
from prog.c:1:
/usr/include/libio.h:434:12: note: expected 'struct _IO_FILE *' but argument is of type 'int *'
extern int _IO_getc (_IO_FILE *__fp);
^
prog.c:34:27: warning: multi-character character constant [-Wmultichar]
while( (c=getc(fp))!= 'EOF')
^
prog.c:36:13: warning: comparison between pointer and integer
if(c=="\n")
^
prog.c:36:13: warning: comparison with string literal results in unspecified behavior [-Waddress]
prog.c:40:31: error: macro "strncmp" requires 3 arguments, but only 2 given
if(strncmp(ar,"\0")!=0)
^
prog.c:40:32: warning: the comparison will always evaluate as 'true' for the address of 'strncmp' will never be NULL [-Waddress]
if(strncmp(ar,"\0")!=0)
^
prog.c:52:12: warning: passing argument 1 of 'fclose' from incompatible pointer type
fclose(fp);
^
In file included from prog.c:1:0:
/usr/include/stdio.h:237:12: note: expected 'struct FILE *' but argument is of type 'int *'
extern int fclose (FILE *__stream);
^
prog.c:32:10: warning: variable 'ar' set but not used [-Wunused-but-set-variable]
char ar[100];
^