From b900da106ff108868efbe9485621a7903245d669 Mon Sep 17 00:00:00 2001 From: Clayton Smith Date: Sun, 5 Nov 2023 09:02:02 -0500 Subject: [PATCH] Fix compiler warnings Signed-off-by: Clayton Smith --- apps/volk_option_helpers.cc | 12 +++--------- kernels/volk/volk_32f_8u_polarbutterflypuppet_32f.h | 6 ++++++ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/apps/volk_option_helpers.cc b/apps/volk_option_helpers.cc index 478049e62..2b6000e97 100644 --- a/apps/volk_option_helpers.cc +++ b/apps/volk_option_helpers.cc @@ -188,6 +188,7 @@ void option_list::parse(int argc, char** argv) } catch (std::exception& exc) { throw std::exception(); }; + break; case STRING: std::cout << this_option->printval << std::endl; break; @@ -225,15 +226,8 @@ void option_list::help() help_line += this_option->shortform + " [ " + this_option->longform + " ]"; } - switch (help_line.size() / 8) { - case 0: - help_line += "\t"; - case 1: - help_line += "\t"; - case 2: - help_line += "\t"; - case 3: - help_line += "\t"; + while (help_line.size() < 32) { + help_line += " "; } help_line += this_option->msg; std::cout << help_line << std::endl; diff --git a/kernels/volk/volk_32f_8u_polarbutterflypuppet_32f.h b/kernels/volk/volk_32f_8u_polarbutterflypuppet_32f.h index 6962a26cf..c97da33d0 100644 --- a/kernels/volk/volk_32f_8u_polarbutterflypuppet_32f.h +++ b/kernels/volk/volk_32f_8u_polarbutterflypuppet_32f.h @@ -81,6 +81,8 @@ static inline void volk_32f_8u_polarbutterflypuppet_32f_generic(float* llrs, unsigned char* u, const int elements) { + (void)input; // suppress unused parameter warning + if (elements < 2) { return; } @@ -108,6 +110,8 @@ static inline void volk_32f_8u_polarbutterflypuppet_32f_u_avx(float* llrs, unsigned char* u, const int elements) { + (void)input; // suppress unused parameter warning + if (elements < 2) { return; } @@ -135,6 +139,8 @@ static inline void volk_32f_8u_polarbutterflypuppet_32f_u_avx2(float* llrs, unsigned char* u, const int elements) { + (void)input; // suppress unused parameter warning + if (elements < 2) { return; }