Include stdlib.h to fix: main.c:69:19: error: implicit declaration of function 'atoi' is invalid in C99 [-Werror,-Wimplicit-function-declaration] Include unistd.h to fix: main.c:65:17: error: implicit declaration of function 'getopt' is invalid in C99 [-Werror,-Wimplicit-function-declaration] Include tokens.h to fix: main.c:48:5: error: implicit declaration of function 'yyparse' is invalid in C99 [-Werror,-Wimplicit-function-declaration] Specify return value of main to fix: main.c:58:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] Delete declaration of unused function getenv to fix: main.c:66:28: warning: this function declaration is not a prototype [-Wstrict-prototypes] --- main.c.orig 2015-11-21 17:42:11.000000000 -0600 +++ main.c 2023-01-12 21:07:44.000000000 -0600 @@ -16,9 +16,12 @@ *****************************************************************************/ /*LINTLIBRARY*/ #include +#include #include #include +#include #include "cupl.h" +#include "tokens.h" extern FILE *yyin; /* the program text file descriptor */ extern int yylineno; /* the current source line count */ @@ -53,13 +56,13 @@ return(0); } +int main(argc, argv) int argc; char *argv[]; { extern int optind; /* getopt() sets this */ extern char *optarg; /* and this */ - extern char *getenv(); int c; while ((c = getopt(argc, argv, "f:v:w:")) != EOF)