In above link- I get 3 errors after adding -fnested_functions as
gcc -c ./rainbow.c -fnested-functions process_wv.c test_file.c test_hdb_file.c
(The 3 files process_wv, test_file, test_hdb_file are removed from rainbow.c and added as seperate .c files to the directory now)
Output:-
./bow/libbow.h:1345:8: note: forward declaration of 'struct argp_child'
struct argp_child; /* forward declare this type */
^
./rainbow.c:655:5: error: function definition is not allowed here
{
^
./rainbow.c:663:8: warning: extra tokens at end of #endif directive [-Wextra-tokens]
#endif VPC_ONLY
^
//
./rainbow.c:734:3: warning: implicit declaration of function 'do_indexing' is invalid in C99
[-Wimplicit-function-declaration]
do_indexing ();
^
./rainbow.c:1175:49: warning: passing 'int *' to parameter of type 'socklen_t *' (aka 'unsigned int *') converts between
pointers to integer types with different sign [-Wpointer-sign]
newsockfd = accept(rainbow_sockfd, &cli_addr, &clilen);
^~~~~~~
/usr/include/sys/socket.h:681:69: note: passing argument to parameter here
int accept(int, struct sockaddr * __restrict, socklen_t * __restrict)
^
./rainbow.c:1586:30: error: use of undeclared identifier 'test_file'
bow_map_filenames_from_dir (test_file.c, 0, dir, "");
^
P.S Why is test_file.c unidentified (bow_map_filenames_from_dir in docnames.c) in rainbow.c even though they are inside the same bow-20020213 folder (Permissions are 755 for all)
Regards