dgorski / app_tdd

TDD Module for Asterisk
3 stars 2 forks source link

app_tdd does not compile #14

Closed InterLinked1 closed 2 years ago

InterLinked1 commented 2 years ago

Your recent changes to app_tdd seem to have broken compilation:

(the master version gets pulled into my CI, so if there are issues, I usually find out quickly)

[CCi] app_tdd.i -> app_tdd.o
app_tdd.c: In function 'tdd_put_msg':
app_tdd.c:597:13: error: invalid storage class for function 'modem_rx_status'
  597 | static void modem_rx_status(void *user_data, int status)
      |             ^~~~~~~~~~~~~~~
app_tdd.c:597:1: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
  597 | static void modem_rx_status(void *user_data, int status)
      | ^~~~~~
app_tdd.c:610:13: error: invalid storage class for function 'starttddrx_process_args'
  610 | static void starttddrx_process_args(struct tdd_info *ti, const char *data)
      |             ^~~~~~~~~~~~~~~~~~~~~~~
app_tdd.c:677:12: error: invalid storage class for function 'do_tdd_rx'
  677 | static int do_tdd_rx(struct ast_channel *chan, const char *data)
      |            ^~~~~~~~~
app_tdd.c:780:12: error: invalid storage class for function 'tdd_rx_exec'
  780 | static int tdd_rx_exec(struct ast_channel *chan, const char *data)
      |            ^~~~~~~~~~~
app_tdd.c:796:12: error: invalid storage class for function 'manager_tddrx'
  796 | static int manager_tddrx(struct mansession *s, const struct message *m)
      |            ^~~~~~~~~~~~~
app_tdd.c:853:13: error: invalid storage class for function 'tdd_send_message'
  853 | static void tdd_send_message(struct tdd_info *ti, const char *message)
      |             ^~~~~~~~~~~~~~~~
app_tdd.c:904:12: error: invalid storage class for function 'tdd_tx_exec'
  904 | static int tdd_tx_exec(struct ast_channel *chan, const char *data)
      |            ^~~~~~~~~~~
app_tdd.c:946:12: error: invalid storage class for function 'manager_tddtx'
  946 | static int manager_tddtx(struct mansession *s, const struct message *m)
      |            ^~~~~~~~~~~~~
app_tdd.c:1009:14: error: invalid storage class for function 'handle_cli_tdd'
 1009 | static char *handle_cli_tdd(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
      |              ^~~~~~~~~~~~~~
app_tdd.c:1090:15: error: initializer element is not constant
 1090 |  AST_CLI_DEFINE(handle_cli_tdd, "Execute a TDD command")
      |               ^~~~~~~~~~~~~~
app_tdd.c:1090:15: note: (near initialization for 'cli_tdd[0].handler')
app_tdd.c:1096:12: error: invalid storage class for function 'unload_module'
 1096 | static int unload_module(void) {
      |            ^~~~~~~~~~~~~
app_tdd.c:1111:12: error: invalid storage class for function 'load_module'
 1111 | static int load_module(void) {
      |            ^~~~~~~~~~~
app_tdd.c:1126:799: error: initializer element is not constant
 1126 | AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "TDD receive application");
      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ^          
app_tdd.c:1126:799: note: (near initialization for '__mod_info.load')
app_tdd.c:1126:822: error: initializer element is not constant
 1126 | AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "TDD receive application");
      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ^            
app_tdd.c:1126:822: note: (near initialization for '__mod_info.unload')
app_tdd.c:1126:959: error: invalid storage class for function '__reg_module'
 1126 | AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "TDD receive application");
      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ^           
app_tdd.c:1126:1056: error: invalid storage class for function '__unreg_module'
 1126 | AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "TDD receive application");
      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ^             
app_tdd.c:1126:1214: error: expected declaration or statement at end of input
 1126 | AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "TDD receive application");
      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ^              
app_tdd.c:1126:1231: error: unused variable 'ast_module_info' [-Werror=unused-variable]
 1126 | AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "TDD receive application");
      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ^              
At top level:
app_tdd.c:1126:1136: error: '__internal_app_tdd_self' defined but not used [-Werror=unused-function]
 1126 | AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "TDD receive application");
      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ^                      
cc1: all warnings being treated as errors
make[1]: *** [/usr/src/asterisk-18.13.0/Makefile.rules:151: app_tdd.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:393: apps] Error 2
InterLinked1 commented 2 years ago

Actually, this appears to have been a random GitHub fluke, rerunning things makes it work again. For some reason, it seems every now and then files fail to fully download and the timing on this just lined up oddly!

dgorski commented 2 years ago

This was actually a bug, I pushed the update to the repo before testing it. You were just unlucky enough to grab it before I pushed the fix. Sorry about that.