Author
anonymous
about 5 years ago
Language
C
Compiler
gcc 10.1.0
Options
Warnings
C89
-pedantic
Author
anonymous
about 5 years ago
$ gcc prog.c -Wall -Wextra -std=c89 -pedantic
prog.c: In function 'main':
prog.c:16:18: warning: unused parameter 'argc' [-Wunused-parameter]
16 | int main(int argc, char *argv[])
| ~~~~^~~~
prog.c: In function 'junk':
prog.c:31:2: warning: unused variable 'arrPersons' [-Wunused-variable]
31 | *arrPersons = (Person*)malloc(10 * sizeof(Person));
| ^~~~~~~~~~
prog.c: In function 'assignInputPeople':
prog.c:43:31: warning: format '%s' expects argument of type 'char *', but argument 4 has type 'long int *' [-Wformat=]
43 | sscanf(fileLine, "%s %s %s", arrPersons[counter]->name,&ID,
| ~^ ~~~
| | |
| char * long int *
| %ld
prog.c:43:34: warning: format '%s' expects argument of type 'char *', but argument 5 has type 'float *' [-Wformat=]
43 | sscanf(fileLine, "%s %s %s", arrPersons[counter]->name,&ID,
| ~^
| |
| char *
| %e
44 | &ageF);
| ~~~~~
| |
| float *
Signal:
Segmentation fault