The EXPORT_PLAY_CMD_HANDLER() macro is only used when READLINE support
is enabled, which leads to
play.c:112: warning: macro "EXPORT_PLAY_CMD_HANDLER" is not used [-Wunused-macros]
Define the macro only when HAVE_READLINE is defined by moving down
the definition to the first user, com_quit().
struct play_command_info {
play_cmd_handler_t handler;
};
-#define EXPORT_PLAY_CMD_HANDLER(_cmd) \
- const struct play_command_info lsg_play_cmd_com_ ## _cmd ## _user_data = { \
- .handler = com_ ## _cmd \
- };
static int loglevel = LL_WARNING;
btr_remove_node(&pt->btrn);
}
+#define EXPORT_PLAY_CMD_HANDLER(_cmd) \
+ const struct play_command_info lsg_play_cmd_com_ ## _cmd ## _user_data = { \
+ .handler = com_ ## _cmd \
+ };
+
static int com_quit(__a_unused struct lls_parse_result *lpr)
{
pt->rq = CRT_TERM_RQ;