viewing paste plugin-build-error | Text

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
        CC      discord-echo.c
discord-echo.c: In function ‘get_channel_config’:
discord-echo.c:61:30: warning: declaration of ‘channel’ shadows a global declaration [-Wshadow]
   61 |     struct config_setting_t *channel = NULL;
      |                              ^~~~~~~
In file included from ../common/HPMDataCheck.h:32,
                 from discord-echo.c:32:
../common/HPMSymbols.inc.h:66:27: note: shadowed declaration is here
   66 | struct channel_interface *channel;
      |                           ^~~~~~~
discord-echo.c:65:34: warning: passing argument 1 of ‘libconfig->lookup_string’ from incompatible pointer type [-Wincompatible-pointer-types]
   65 |         libconfig->lookup_string(&channel, key, &find_value);
      |                                  ^~~~~~~~
      |                                  |
      |                                  struct config_setting_t **
discord-echo.c:65:34: note: expected ‘const struct config_t *’ but argument is of type ‘struct config_setting_t **’
discord-echo.c: In function ‘async_hercules_echo’:
discord-echo.c:92:34: warning: passing argument 1 of ‘libconfig->lookup_string’ from incompatible pointer type [-Wincompatible-pointer-types]
   92 |         libconfig->lookup_string(&find_channel, "discord_webhook_id", &webhook_id_str);
      |                                  ^~~~~~~~~~~~~
      |                                  |
      |                                  struct config_setting_t **
discord-echo.c:92:34: note: expected ‘const struct config_t *’ but argument is of type ‘struct config_setting_t **’
discord-echo.c:92:71: warning: passing argument 3 of ‘libconfig->lookup_string’ from incompatible pointer type [-Wincompatible-pointer-types]
   92 |         libconfig->lookup_string(&find_channel, "discord_webhook_id", &webhook_id_str);
      |                                                                       ^~~~~~~~~~~~~~~
      |                                                                       |
      |                                                                       char **
discord-echo.c:92:71: note: expected ‘const char **’ but argument is of type ‘char **’
discord-echo.c:93:34: warning: passing argument 1 of ‘libconfig->lookup_string’ from incompatible pointer type [-Wincompatible-pointer-types]
   93 |         libconfig->lookup_string(&find_channel, "discord_webhook_token", &webhook_token);
      |                                  ^~~~~~~~~~~~~
      |                                  |
      |                                  struct config_setting_t **
discord-echo.c:93:34: note: expected ‘const struct config_t *’ but argument is of type ‘struct config_setting_t **’
discord-echo.c:93:74: warning: passing argument 3 of ‘libconfig->lookup_string’ from incompatible pointer type [-Wincompatible-pointer-types]
   93 |         libconfig->lookup_string(&find_channel, "discord_webhook_token", &webhook_token);
      |                                                                          ^~~~~~~~~~~~~~
      |                                                                          |
      |                                                                          char **
discord-echo.c:93:74: note: expected ‘const char **’ but argument is of type ‘char **’
discord-echo.c: In function ‘hercules_echo’:
discord-echo.c:124:15: warning: declaration of ‘thread’ shadows a global declaration [-Wshadow]
  124 |     pthread_t thread;
      |               ^~~~~~
In file included from ../common/HPMDataCheck.h:32,
                 from discord-echo.c:32:
../common/HPMSymbols.inc.h:357:26: note: shadowed declaration is here
  357 | struct thread_interface *thread;
      |                          ^~~~~~
discord-echo.c: In function ‘discord_bot_on_ready’:
discord-echo.c:134:43: warning: declaration of ‘discord_client’ shadows a global declaration [-Wshadow]
  134 | void discord_bot_on_ready(struct discord *discord_client, const struct discord_ready *event) {
      |                           ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
discord-echo.c:51:17: note: shadowed declaration is here
   51 | struct discord *discord_client;
      |                 ^~~~~~~~~~~~~~
discord-echo.c: In function ‘discord_bot_on_message’:
discord-echo.c:141:45: warning: declaration of ‘discord_client’ shadows a global declaration [-Wshadow]
  141 | void discord_bot_on_message(struct discord *discord_client, const struct discord_message *event) {
      |                             ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
discord-echo.c:51:17: note: shadowed declaration is here
   51 | struct discord *discord_client;
      |                 ^~~~~~~~~~~~~~
discord-echo.c:169:30: warning: passing argument 1 of ‘libconfig->lookup_string’ from incompatible pointer type [-Wincompatible-pointer-types]
  169 |     libconfig->lookup_string(&find_channel, "ingame_channel", &channel_name);
      |                              ^~~~~~~~~~~~~
      |                              |
      |                              struct config_setting_t **
discord-echo.c:169:30: note: expected ‘const struct config_t *’ but argument is of type ‘struct config_setting_t **’
In file included from ../common/HPMi.h:27,
                 from ../common/hercules.h:39,
                 from discord-echo.c:26:
../common/showmsg.h:137:53: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘u64snowflake’ {aka ‘const long unsigned int’} [-Wformat=]
  137 | #define ShowWarning(fmt, ...) (showmsg->showWarning((fmt), ##__VA_ARGS__))
      |                                                     ^~~~~
discord-echo.c:171:9: note: in expansion of macro ‘ShowWarning’
  171 |         ShowWarning("discord_bot_on_message: Channel config not found: %s\n", event->channel_id);
      |         ^~~~~~~~~~~
discord-echo.c: In function ‘server_online’:
discord-echo.c:219:51: warning: passing argument 3 of ‘pthread_create’ from incompatible pointer type [-Wincompatible-pointer-types]
  219 |     if (pthread_create(&discord_bot_thread, NULL, async_start_discord_bot, NULL) != 0) {
      |                                                   ^~~~~~~~~~~~~~~~~~~~~~~
      |                                                   |
      |                                                   void * (*)(void)
In file included from discord-echo.c:38:
/usr/include/pthread.h:200:15: note: expected ‘void * (*)(void *)’ but argument is of type ‘void * (*)(void)’
  200 |       void *(*__start_routine) (void *),
      |       ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/ld: /tmp/cc5kcl89.o: in function `async_start_discord_bot':
/home/vietlubu/hercules/src/plugins/discord-echo.c:192: undefined reference to `discord_init'
/usr/bin/ld: /home/vietlubu/hercules/src/plugins/discord-echo.c:194: undefined reference to `discord_add_intents'
/usr/bin/ld: /home/vietlubu/hercules/src/plugins/discord-echo.c:195: undefined reference to `discord_set_on_ready'
/usr/bin/ld: /home/vietlubu/hercules/src/plugins/discord-echo.c:196: undefined reference to `discord_set_on_message_create'
/usr/bin/ld: /home/vietlubu/hercules/src/plugins/discord-echo.c:197: undefined reference to `discord_run'
/usr/bin/ld: /tmp/cc5kcl89.o: in function `async_hercules_echo':
/home/vietlubu/hercules/src/plugins/discord-echo.c:109: undefined reference to `discord_execute_webhook'
/usr/bin/ld: /tmp/cc5kcl89.o: in function `server_post_final':
/home/vietlubu/hercules/src/plugins/discord-echo.c:226: undefined reference to `discord_shutdown'
collect2: error: ld returned 1 exit status
make: *** [Makefile:109: ../../plugins/discord-echo.so] Error 1
Viewed 508 times, submitted by Guest.