From bd03d877df273df729188907a4c98956ca25e7df Mon Sep 17 00:00:00 2001 From: gc87 Date: Fri, 23 Jul 2021 10:52:32 +0800 Subject: [PATCH] Fix the constant expression problem of gcc. --- plugins/plugin_sample.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/plugin_sample.c b/plugins/plugin_sample.c index ce1761c6..c4779ed7 100644 --- a/plugins/plugin_sample.c +++ b/plugins/plugin_sample.c @@ -22,6 +22,8 @@ #include "neuron.h" +#define SAMPLE_PLUGIN_DESCR "A sample plugin for demonstrate how to write a neuron plugin" + const neu_plugin_module_t neu_plugin_module; struct neu_plugin { @@ -138,11 +140,9 @@ static const neu_plugin_intf_funs_t plugin_intf_funs = { .open = .request = sample_plugin_request, .event_reply = sample_plugin_event_reply }; -static const char *const sample_plugin_descr = - "A sample plugin for demonstrate how to write a neuron plugin"; const neu_plugin_module_t neu_plugin_module = { .version = NEURON_PLUGIN_VER_1_0, .module_name = "neuron-sample-plugin", - .module_descr = sample_plugin_descr, + .module_descr = SAMPLE_PLUGIN_DESCR, .intf_funs = &plugin_intf_funs };