prog.c: In function ‘maint’:
prog.c:13:10: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘char (*)[50]’ [-Wformat=]
scanf("%s", &userName);
~^ ~~~~~~~~~
prog.c:21:22: error: ‘DRINKING_AGE’ undeclared (first use in this function)
userName, curAge, DRINKING_AGE, noYears);
^~~~~~~~~~~~
prog.c:21:22: note: each undeclared identifier is reported only once for each function it appears in
prog.c: In function ‘calcYear’:
prog.c:28:9: error: ‘DRINKING_AGE’ undeclared (first use in this function)
return(DRINKING_AGE-curAge);
^~~~~~~~~~~~
prog.c: In function ‘maint’:
prog.c:13:2: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%s", &userName);
^~~~~~~~~~~~~~~~~~~~~~
prog.c:15:2: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
scanf(" %d", &curAge);
^~~~~~~~~~~~~~~~~~~~~
prog.c: In function ‘calcYear’:
prog.c:29:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^