在上面的链接中 - 添加 -fnested_functions 后出现 3 个错误
gcc -c ./rainbow.c -fnested-functions process_wv.c test_file.c test_hdb_file.c
(3 个文件 process_wv、test_file、test_hdb_file 已从 rainbow.c 中删除,现在作为单独的 .c 文件添加到目录中)
输出:-
./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, "");
^
PS为什么test_file.c在rainbow.c中无法识别(docnames.c中的bow_map_filenames_from_dir),即使它们位于同一个bow-20020213文件夹中(所有人的权限都是755)
问候