Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dtorkin@ubuntu1:~/Desktop/v0.12$ make
- gcc -Wall -Wextra -g -Iprotocol -Iio -Isvm -Iuvm -Iconfig -pthread -c -o svm/svm_main.o svm/svm_main.c
- svm/svm_main.c: In function ‘handle_shutdown_signal’:
- svm/svm_main.c:17:5: warning: implicit declaration of function ‘fprintf’ [-Wimplicit-function-declaration]
- 17 | fprintf(stdout, "\nSVM: Получен сигнал завершения (%d). Инициируем остановку потоков...\n", sig);
- | ^~~~~~~
- svm/svm_main.c:6:1: note: include ‘<stdio.h>’ or provide a declaration of ‘fprintf’
- 5 | #include "svm_timers.h" // Теперь содержит и timer_thread_func, и stop_timer_thread и т.д.
- +++ |+#include <stdio.h>
- 6 |
- svm/svm_main.c:17:5: warning: incompatible implicit declaration of built-in function ‘fprintf’ [-Wbuiltin-declaration-mismatch]
- 17 | fprintf(stdout, "\nSVM: Получен сигнал завершения (%d). Инициируем остановку потоков...\n", sig);
- | ^~~~~~~
- svm/svm_main.c:17:5: note: include ‘<stdio.h>’ or provide a declaration of ‘fprintf’
- svm/svm_main.c:17:13: error: ‘stdout’ undeclared (first use in this function)
- 17 | fprintf(stdout, "\nSVM: Получен сигнал завершения (%d). Инициируем остановку потоков...\n", sig);
- | ^~~~~~
- svm/svm_main.c:17:13: note: ‘stdout’ is defined in header ‘<stdio.h>’; did you forget to ‘#include <stdio.h>’?
- svm/svm_main.c:17:13: note: each undeclared identifier is reported only once for each function it appears in
- svm/svm_main.c:19:5: error: ‘keep_running’ undeclared (first use in this function)
- 19 | keep_running = false;
- | ^~~~~~~~~~~~
- svm/svm_main.c:23:9: error: ‘svm_incoming_queue’ undeclared (first use in this function)
- 23 | if (svm_incoming_queue) queue_shutdown(svm_incoming_queue);
- | ^~~~~~~~~~~~~~~~~~
- svm/svm_main.c:23:29: warning: implicit declaration of function ‘queue_shutdown’ [-Wimplicit-function-declaration]
- 23 | if (svm_incoming_queue) queue_shutdown(svm_incoming_queue);
- | ^~~~~~~~~~~~~~
- svm/svm_main.c:24:9: error: ‘svm_outgoing_queue’ undeclared (first use in this function)
- 24 | if (svm_outgoing_queue) queue_shutdown(svm_outgoing_queue);
- | ^~~~~~~~~~~~~~~~~~
- svm/svm_main.c: In function ‘main’:
- svm/svm_main.c:32:9: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
- 32 | printf("SVM запуск...\n");
- | ^~~~~~
- svm/svm_main.c:32:9: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
- svm/svm_main.c:32:9: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch]
- svm/svm_main.c:32:9: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
- svm/svm_main.c:36:9: warning: implicit declaration of function ‘exit’ [-Wimplicit-function-declaration]
- 36 | exit(EXIT_FAILURE);
- | ^~~~
- svm/svm_main.c:6:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
- 5 | #include "svm_timers.h" // Теперь содержит и timer_thread_func, и stop_timer_thread и т.д.
- +++ |+#include <stdlib.h>
- 6 |
- svm/svm_main.c:36:9: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch]
- 36 | exit(EXIT_FAILURE);
- | ^~~~
- svm/svm_main.c:36:9: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
- svm/svm_main.c:36:14: error: ‘EXIT_FAILURE’ undeclared (first use in this function)
- 36 | exit(EXIT_FAILURE);
- | ^~~~~~~~~~~~
- svm/svm_main.c:36:14: note: ‘EXIT_FAILURE’ is defined in header ‘<stdlib.h>’; did you forget to ‘#include <stdlib.h>’?
- svm/svm_main.c:38:5: warning: implicit declaration of function ‘init_message_handlers’ [-Wimplicit-function-declaration]
- 38 | init_message_handlers();
- | ^~~~~~~~~~~~~~~~~~~~~
- svm/svm_main.c:42:5: error: ‘svm_incoming_queue’ undeclared (first use in this function)
- 42 | svm_incoming_queue = queue_create(100);
- | ^~~~~~~~~~~~~~~~~~
- svm/svm_main.c:42:26: warning: implicit declaration of function ‘queue_create’ [-Wimplicit-function-declaration]
- 42 | svm_incoming_queue = queue_create(100);
- | ^~~~~~~~~~~~
- svm/svm_main.c:43:5: error: ‘svm_outgoing_queue’ undeclared (first use in this function)
- 43 | svm_outgoing_queue = queue_create(100);
- | ^~~~~~~~~~~~~~~~~~
- svm/svm_main.c:47:22: error: storage size of ‘sa’ isn’t known
- 47 | struct sigaction sa;
- | ^~
- svm/svm_main.c:48:5: warning: implicit declaration of function ‘memset’ [-Wimplicit-function-declaration]
- 48 | memset(&sa, 0, sizeof(sa));
- | ^~~~~~
- svm/svm_main.c:6:1: note: include ‘<string.h>’ or provide a declaration of ‘memset’
- 5 | #include "svm_timers.h" // Теперь содержит и timer_thread_func, и stop_timer_thread и т.д.
- +++ |+#include <string.h>
- 6 |
- svm/svm_main.c:48:5: warning: incompatible implicit declaration of built-in function ‘memset’ [-Wbuiltin-declaration-mismatch]
- 48 | memset(&sa, 0, sizeof(sa));
- | ^~~~~~
- svm/svm_main.c:48:5: note: include ‘<string.h>’ or provide a declaration of ‘memset’
- svm/svm_main.c:50:5: warning: implicit declaration of function ‘sigaction’ [-Wimplicit-function-declaration]
- 50 | sigaction(SIGINT, &sa, NULL);
- | ^~~~~~~~~
- svm/svm_main.c:50:15: error: ‘SIGINT’ undeclared (first use in this function)
- 50 | sigaction(SIGINT, &sa, NULL);
- | ^~~~~~
- svm/svm_main.c:51:15: error: ‘SIGTERM’ undeclared (first use in this function)
- 51 | sigaction(SIGTERM, &sa, NULL);
- | ^~~~~~~
- svm/svm_main.c:55:10: error: ‘global_client_handle’ undeclared (first use in this function)
- 55 | if (global_client_handle < 0 && keep_running) {
- | ^~~~~~~~~~~~~~~~~~~~
- svm/svm_main.c:55:38: error: ‘keep_running’ undeclared (first use in this function)
- 55 | if (global_client_handle < 0 && keep_running) {
- | ^~~~~~~~~~~~
- svm/svm_main.c:56:10: warning: incompatible implicit declaration of built-in function ‘fprintf’ [-Wbuiltin-declaration-mismatch]
- 56 | fprintf(stderr, "SVM: Не удалось установить коммуникационный канал.\n");
- | ^~~~~~~
- svm/svm_main.c:56:10: note: include ‘<stdio.h>’ or provide a declaration of ‘fprintf’
- svm/svm_main.c:56:18: error: ‘stderr’ undeclared (first use in this function)
- 56 | fprintf(stderr, "SVM: Не удалось установить коммуникационный канал.\n");
- | ^~~~~~
- svm/svm_main.c:56:18: note: ‘stderr’ is defined in header ‘<stdio.h>’; did you forget to ‘#include <stdio.h>’?
- svm/svm_main.c:64:25: error: ‘timer_tid’ undeclared (first use in this function); did you mean ‘timer_t’?
- 64 | if (pthread_create(&timer_tid, NULL, timer_thread_func, NULL) != 0) { perror("SVM: Failed to create timer thread"); goto cleanup_threads; }
- | ^~~~~~~~~
- | timer_t
- svm/svm_main.c:64:75: warning: implicit declaration of function ‘perror’ [-Wimplicit-function-declaration]
- 64 | hread_create(&timer_tid, NULL, timer_thread_func, NULL) != 0) { perror("SVM: Failed to create timer thread"); goto cleanup_threads; }
- | ^~~~~~
- svm/svm_main.c:66:25: error: ‘receiver_tid’ undeclared (first use in this function); did you mean ‘receiver_created’?
- 66 | if (pthread_create(&receiver_tid, NULL, receiver_thread_func, NULL) != 0) { perror("SVM: Failed to create receiver thread"); goto cleanup_threads; }
- | ^~~~~~~~~~~~
- | receiver_created
- svm/svm_main.c:68:25: error: ‘processor_tid’ undeclared (first use in this function); did you mean ‘processor_created’?
- 68 | if (pthread_create(&processor_tid, NULL, processor_thread_func, NULL) != 0) { perror("SVM: Failed to create processor thread"); goto cleanup_threads; }
- | ^~~~~~~~~~~~~
- | processor_created
- svm/svm_main.c:70:26: error: ‘sender_tid’ undeclared (first use in this function); did you mean ‘sender_created’?
- 70 | if (pthread_create(&sender_tid, NULL, sender_thread_func, NULL) != 0) { perror("SVM: Failed to create sender thread"); goto cleanup_threads; }
- | ^~~~~~~~~~
- | sender_created
- svm/svm_main.c:94:9: warning: implicit declaration of function ‘shutdown’ [-Wimplicit-function-declaration]
- 94 | shutdown(global_client_handle, SHUT_RDWR);
- | ^~~~~~~~
- svm/svm_main.c:94:40: error: ‘SHUT_RDWR’ undeclared (first use in this function)
- 94 | shutdown(global_client_handle, SHUT_RDWR);
- | ^~~~~~~~~
- svm/svm_main.c:109:5: warning: incompatible implicit declaration of built-in function ‘fprintf’ [-Wbuiltin-declaration-mismatch]
- 109 | fprintf(stderr, "SVM: Ошибка создания одного из потоков. Инициируем остановку созданных...\n");
- | ^~~~~~~
- svm/svm_main.c:109:5: note: include ‘<stdio.h>’ or provide a declaration of ‘fprintf’
- svm/svm_main.c:128:13: error: ‘io_svm’ undeclared (first use in this function)
- 128 | if (io_svm) io_svm->disconnect(io_svm, global_client_handle);
- | ^~~~~~
- svm/svm_main.c:133:9: error: ‘serverSocketFD’ undeclared (first use in this function)
- 133 | if (serverSocketFD >= 0) { // Закрываем слушающий сокет, если он был и не закрыт
- | ^~~~~~~~~~~~~~
- svm/svm_main.c:135:15: warning: implicit declaration of function ‘close’ [-Wimplicit-function-declaration]
- 135 | else close(serverSocketFD);
- | ^~~~~
- svm/svm_main.c:138:29: warning: implicit declaration of function ‘queue_destroy’ [-Wimplicit-function-declaration]
- 138 | if (svm_incoming_queue) queue_destroy(svm_incoming_queue);
- | ^~~~~~~~~~~~~
- svm/svm_main.c:47:22: warning: unused variable ‘sa’ [-Wunused-variable]
- 47 | struct sigaction sa;
- | ^~
- make: *** [<встроенное>: svm/svm_main.o] Ошибка 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement