Advertisement
dtorkin

Untitled

Apr 9th, 2025
411
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 10.77 KB | None | 0 0
  1. dtorkin@ubuntu1:~/Desktop/v0.12$ make
  2. gcc -Wall -Wextra -g -Iprotocol -Iio -Isvm -Iuvm -Iconfig -pthread    -c -o svm/svm_main.o svm/svm_main.c
  3. svm/svm_main.c: In function ‘handle_shutdown_signal’:
  4. svm/svm_main.c:17:5: warning: implicit declaration of functionfprintf[-Wimplicit-function-declaration]
  5.    17 |     fprintf(stdout, "\nSVM: Получен сигнал завершения (%d). Инициируем остановку потоков...\n", sig);
  6.       |     ^~~~~~~
  7. svm/svm_main.c:6:1: note: include ‘<stdio.h>’ or provide a declaration of ‘fprintf
  8.     5 | #include "svm_timers.h" // Теперь содержит и timer_thread_func, и stop_timer_thread и т.д.
  9.   +++ |+#include <stdio.h>
  10.     6 |
  11. svm/svm_main.c:17:5: warning: incompatible implicit declaration of built-in functionfprintf[-Wbuiltin-declaration-mismatch]
  12.    17 |     fprintf(stdout, "\nSVM: Получен сигнал завершения (%d). Инициируем остановку потоков...\n", sig);
  13.       |     ^~~~~~~
  14. svm/svm_main.c:17:5: note: include ‘<stdio.h>’ or provide a declaration of ‘fprintf
  15. svm/svm_main.c:17:13: error: ‘stdout’ undeclared (first use in this function)
  16.    17 |     fprintf(stdout, "\nSVM: Получен сигнал завершения (%d). Инициируем остановку потоков...\n", sig);
  17.       |             ^~~~~~
  18. svm/svm_main.c:17:13: note: ‘stdout’ is defined in header ‘<stdio.h>; did you forget to ‘#include <stdio.h>’?
  19. svm/svm_main.c:17:13: note: each undeclared identifier is reported only once for each function it appears in
  20. svm/svm_main.c:19:5: error: ‘keep_running’ undeclared (first use in this function)
  21.    19 |     keep_running = false;
  22.       |     ^~~~~~~~~~~~
  23. svm/svm_main.c:23:9: error: ‘svm_incoming_queue’ undeclared (first use in this function)
  24.    23 |     if (svm_incoming_queue) queue_shutdown(svm_incoming_queue);
  25.       |         ^~~~~~~~~~~~~~~~~~
  26. svm/svm_main.c:23:29: warning: implicit declaration of function ‘queue_shutdown’ [-Wimplicit-function-declaration]
  27.    23 |     if (svm_incoming_queue) queue_shutdown(svm_incoming_queue);
  28.       |                             ^~~~~~~~~~~~~~
  29. svm/svm_main.c:24:9: error: ‘svm_outgoing_queue’ undeclared (first use in this function)
  30.    24 |     if (svm_outgoing_queue) queue_shutdown(svm_outgoing_queue);
  31.       |         ^~~~~~~~~~~~~~~~~~
  32. svm/svm_main.c: In function ‘main’:
  33. svm/svm_main.c:32:9: warning: implicit declaration of functionprintf[-Wimplicit-function-declaration]
  34.    32 |         printf("SVM запуск...\n");
  35.       |         ^~~~~~
  36. svm/svm_main.c:32:9: note: include ‘<stdio.h>’ or provide a declaration of ‘printf
  37. svm/svm_main.c:32:9: warning: incompatible implicit declaration of built-in functionprintf[-Wbuiltin-declaration-mismatch]
  38. svm/svm_main.c:32:9: note: include ‘<stdio.h>’ or provide a declaration of ‘printf
  39. svm/svm_main.c:36:9: warning: implicit declaration of functionexit[-Wimplicit-function-declaration]
  40.    36 |         exit(EXIT_FAILURE);
  41.       |         ^~~~
  42. svm/svm_main.c:6:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit
  43.     5 | #include "svm_timers.h" // Теперь содержит и timer_thread_func, и stop_timer_thread и т.д.
  44.   +++ |+#include <stdlib.h>
  45.     6 |
  46. svm/svm_main.c:36:9: warning: incompatible implicit declaration of built-in functionexit[-Wbuiltin-declaration-mismatch]
  47.    36 |         exit(EXIT_FAILURE);
  48.       |         ^~~~
  49. svm/svm_main.c:36:9: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit
  50. svm/svm_main.c:36:14: error: ‘EXIT_FAILURE’ undeclared (first use in this function)
  51.    36 |         exit(EXIT_FAILURE);
  52.       |              ^~~~~~~~~~~~
  53. svm/svm_main.c:36:14: note: ‘EXIT_FAILURE’ is defined in header ‘<stdlib.h>; did you forget to ‘#include <stdlib.h>’?
  54. svm/svm_main.c:38:5: warning: implicit declaration of function ‘init_message_handlers’ [-Wimplicit-function-declaration]
  55.    38 |     init_message_handlers();
  56.       |     ^~~~~~~~~~~~~~~~~~~~~
  57. svm/svm_main.c:42:5: error: ‘svm_incoming_queue’ undeclared (first use in this function)
  58.    42 |     svm_incoming_queue = queue_create(100);
  59.       |     ^~~~~~~~~~~~~~~~~~
  60. svm/svm_main.c:42:26: warning: implicit declaration of function ‘queue_create’ [-Wimplicit-function-declaration]
  61.    42 |     svm_incoming_queue = queue_create(100);
  62.       |                          ^~~~~~~~~~~~
  63. svm/svm_main.c:43:5: error: ‘svm_outgoing_queue’ undeclared (first use in this function)
  64.    43 |     svm_outgoing_queue = queue_create(100);
  65.       |     ^~~~~~~~~~~~~~~~~~
  66. svm/svm_main.c:47:22: error: storage size of ‘sa’ isn’t known
  67.    47 |     struct sigaction sa;
  68.       |                      ^~
  69. svm/svm_main.c:48:5: warning: implicit declaration of functionmemset[-Wimplicit-function-declaration]
  70.    48 |     memset(&sa, 0, sizeof(sa));
  71.       |     ^~~~~~
  72. svm/svm_main.c:6:1: note: include ‘<string.h>’ or provide a declaration of ‘memset
  73.     5 | #include "svm_timers.h" // Теперь содержит и timer_thread_func, и stop_timer_thread и т.д.
  74.   +++ |+#include <string.h>
  75.     6 |
  76. svm/svm_main.c:48:5: warning: incompatible implicit declaration of built-in functionmemset[-Wbuiltin-declaration-mismatch]
  77.    48 |     memset(&sa, 0, sizeof(sa));
  78.       |     ^~~~~~
  79. svm/svm_main.c:48:5: note: include ‘<string.h>’ or provide a declaration of ‘memset
  80. svm/svm_main.c:50:5: warning: implicit declaration of function ‘sigaction’ [-Wimplicit-function-declaration]
  81.    50 |     sigaction(SIGINT, &sa, NULL);
  82.       |     ^~~~~~~~~
  83. svm/svm_main.c:50:15: error: ‘SIGINT’ undeclared (first use in this function)
  84.    50 |     sigaction(SIGINT, &sa, NULL);
  85.       |               ^~~~~~
  86. svm/svm_main.c:51:15: error: ‘SIGTERM’ undeclared (first use in this function)
  87.    51 |     sigaction(SIGTERM, &sa, NULL);
  88.       |               ^~~~~~~
  89. svm/svm_main.c:55:10: error: ‘global_client_handle’ undeclared (first use in this function)
  90.    55 |      if (global_client_handle < 0 && keep_running) {
  91.       |          ^~~~~~~~~~~~~~~~~~~~
  92. svm/svm_main.c:55:38: error: ‘keep_running’ undeclared (first use in this function)
  93.    55 |      if (global_client_handle < 0 && keep_running) {
  94.       |                                      ^~~~~~~~~~~~
  95. svm/svm_main.c:56:10: warning: incompatible implicit declaration of built-in functionfprintf[-Wbuiltin-declaration-mismatch]
  96.    56 |          fprintf(stderr, "SVM: Не удалось установить коммуникационный канал.\n");
  97.       |          ^~~~~~~
  98. svm/svm_main.c:56:10: note: include ‘<stdio.h>’ or provide a declaration of ‘fprintf
  99. svm/svm_main.c:56:18: error: ‘stderr’ undeclared (first use in this function)
  100.    56 |          fprintf(stderr, "SVM: Не удалось установить коммуникационный канал.\n");
  101.       |                  ^~~~~~
  102. svm/svm_main.c:56:18: note: ‘stderr’ is defined in header ‘<stdio.h>; did you forget to ‘#include <stdio.h>’?
  103. svm/svm_main.c:64:25: error: ‘timer_tid’ undeclared (first use in this function); did you mean ‘timer_t’?
  104.    64 |     if (pthread_create(&timer_tid, NULL, timer_thread_func, NULL) != 0) { perror("SVM: Failed to create timer thread"); goto cleanup_threads; }
  105.       |                         ^~~~~~~~~
  106.       |                         timer_t
  107. svm/svm_main.c:64:75: warning: implicit declaration of functionperror[-Wimplicit-function-declaration]
  108.    64 | hread_create(&timer_tid, NULL, timer_thread_func, NULL) != 0) { perror("SVM: Failed to create timer thread"); goto cleanup_threads; }
  109.       |                                                                 ^~~~~~
  110.  
  111. svm/svm_main.c:66:25: error: ‘receiver_tid’ undeclared (first use in this function); did you mean ‘receiver_created’?
  112.    66 |     if (pthread_create(&receiver_tid, NULL, receiver_thread_func, NULL) != 0) { perror("SVM: Failed to create receiver thread"); goto cleanup_threads; }
  113.       |                         ^~~~~~~~~~~~
  114.       |                         receiver_created
  115. svm/svm_main.c:68:25: error: ‘processor_tid’ undeclared (first use in this function); did you mean ‘processor_created’?
  116.    68 |     if (pthread_create(&processor_tid, NULL, processor_thread_func, NULL) != 0) { perror("SVM: Failed to create processor thread"); goto cleanup_threads; }
  117.       |                         ^~~~~~~~~~~~~
  118.       |                         processor_created
  119. svm/svm_main.c:70:26: error: ‘sender_tid’ undeclared (first use in this function); did you mean ‘sender_created’?
  120.    70 |      if (pthread_create(&sender_tid, NULL, sender_thread_func, NULL) != 0) { perror("SVM: Failed to create sender thread"); goto cleanup_threads; }
  121.       |                          ^~~~~~~~~~
  122.       |                          sender_created
  123. svm/svm_main.c:94:9: warning: implicit declaration of function ‘shutdown’ [-Wimplicit-function-declaration]
  124.    94 |         shutdown(global_client_handle, SHUT_RDWR);
  125.       |         ^~~~~~~~
  126. svm/svm_main.c:94:40: error: ‘SHUT_RDWR’ undeclared (first use in this function)
  127.    94 |         shutdown(global_client_handle, SHUT_RDWR);
  128.       |                                        ^~~~~~~~~
  129. svm/svm_main.c:109:5: warning: incompatible implicit declaration of built-in functionfprintf[-Wbuiltin-declaration-mismatch]
  130.   109 |     fprintf(stderr, "SVM: Ошибка создания одного из потоков. Инициируем остановку созданных...\n");
  131.       |     ^~~~~~~
  132. svm/svm_main.c:109:5: note: include ‘<stdio.h>’ or provide a declaration of ‘fprintf
  133. svm/svm_main.c:128:13: error: ‘io_svm’ undeclared (first use in this function)
  134.   128 |         if (io_svm) io_svm->disconnect(io_svm, global_client_handle);
  135.       |             ^~~~~~
  136. svm/svm_main.c:133:9: error: ‘serverSocketFD’ undeclared (first use in this function)
  137.   133 |     if (serverSocketFD >= 0) { // Закрываем слушающий сокет, если он был и не закрыт
  138.       |         ^~~~~~~~~~~~~~
  139. svm/svm_main.c:135:15: warning: implicit declaration of function ‘close’ [-Wimplicit-function-declaration]
  140.   135 |          else close(serverSocketFD);
  141.       |               ^~~~~
  142. svm/svm_main.c:138:29: warning: implicit declaration of function ‘queue_destroy’ [-Wimplicit-function-declaration]
  143.   138 |     if (svm_incoming_queue) queue_destroy(svm_incoming_queue);
  144.       |                             ^~~~~~~~~~~~~
  145. svm/svm_main.c:47:22: warning: unused variable ‘sa’ [-Wunused-variable]
  146.    47 |     struct sigaction sa;
  147.       |                      ^~
  148. make: *** [<встроенное>: svm/svm_main.o] Ошибка 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement