From e71093d30018007e5c05147091ab9bf46b0f01ba Mon Sep 17 00:00:00 2001 From: Takeru Ohta Date: Thu, 20 Jan 2022 10:14:36 +0900 Subject: [PATCH] Add `#undef` to fix compiler warnings --- src/rnn_reader.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/rnn_reader.c b/src/rnn_reader.c index 7ac614b1..f01149ce 100644 --- a/src/rnn_reader.c +++ b/src/rnn_reader.c @@ -154,6 +154,7 @@ RNNModel* rnnoise_model_from_string(const char* s) { if (!ret) return NULL; +#undef ALLOC_LAYER #define ALLOC_LAYER(type, name) \ type* name; \ name = calloc(1, sizeof(type)); \ @@ -170,6 +171,7 @@ RNNModel* rnnoise_model_from_string(const char* s) { ALLOC_LAYER(DenseLayer, denoise_output); ALLOC_LAYER(DenseLayer, vad_output); +#undef INPUT_VAL #define INPUT_VAL(name) \ do { \ if (sscanf(s, "%d%n", &in, &n) != 1 || in < 0 || in > 128) { \ @@ -180,6 +182,7 @@ RNNModel* rnnoise_model_from_string(const char* s) { name = in; \ } while (0) +#undef INPUT_ACTIVATION #define INPUT_ACTIVATION(name) \ do { \ int activation; \ @@ -196,6 +199,7 @@ RNNModel* rnnoise_model_from_string(const char* s) { } \ } while (0) +#undef INPUT_ARRAY #define INPUT_ARRAY(name, len) \ do { \ rnn_weight* values = malloc((len) * sizeof(rnn_weight)); \ @@ -214,6 +218,7 @@ RNNModel* rnnoise_model_from_string(const char* s) { } \ } while (0) +#undef INPUT_DENSE #define INPUT_DENSE(name) \ do { \ INPUT_VAL(name->nb_inputs); \ @@ -224,6 +229,7 @@ RNNModel* rnnoise_model_from_string(const char* s) { INPUT_ARRAY(name->bias, name->nb_neurons); \ } while (0) +#undef INPUT_GRU #define INPUT_GRU(name) \ do { \ INPUT_VAL(name->nb_inputs); \