Adding __attribute__((unused)) in tracking GNURadio work functions to

disable unused variable warnings without wasting any extra CPU cycle
This commit is contained in:
Javier Arribas 2016-04-06 15:04:52 +02:00
parent 9db0990adc
commit 203e998efc
9 changed files with 12 additions and 46 deletions

View File

@ -263,7 +263,7 @@ galileo_e1_dll_pll_veml_tracking_cc::~galileo_e1_dll_pll_veml_tracking_cc()
int galileo_e1_dll_pll_veml_tracking_cc::general_work (int noutput_items, gr_vector_int &ninput_items,
int galileo_e1_dll_pll_veml_tracking_cc::general_work (int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
{
double carr_error_hz = 0.0;
@ -534,10 +534,6 @@ int galileo_e1_dll_pll_veml_tracking_cc::general_work (int noutput_items, gr_vec
consume_each(d_current_prn_length_samples); // this is required for gr_block derivates
d_sample_counter += d_current_prn_length_samples; //count for the processed samples
if((noutput_items == 0) || (ninput_items[0] == 0))
{
LOG(WARNING) << "noutput_items = 0";
}
return 1; //output tracking result ALWAYS even in the case of d_enable_tracking==false
}

View File

@ -100,8 +100,8 @@ Galileo_E1_Tcp_Connector_Tracking_cc::Galileo_E1_Tcp_Connector_Tracking_cc(
boost::shared_ptr<gr::msg_queue> queue,
bool dump,
std::string dump_filename,
float pll_bw_hz,
float dll_bw_hz,
float pll_bw_hz __attribute__((unused)),
float dll_bw_hz __attribute__((unused)),
float early_late_space_chips,
float very_early_late_space_chips,
size_t port_ch0):
@ -261,7 +261,7 @@ Galileo_E1_Tcp_Connector_Tracking_cc::~Galileo_E1_Tcp_Connector_Tracking_cc()
}
int Galileo_E1_Tcp_Connector_Tracking_cc::general_work (int noutput_items, gr_vector_int &ninput_items,
int Galileo_E1_Tcp_Connector_Tracking_cc::general_work (int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
{
// process vars
@ -541,10 +541,7 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work (int noutput_items, gr_ve
}
consume_each(d_current_prn_length_samples); // this is needed in gr::block derivates
d_sample_counter += d_current_prn_length_samples; //count for the processed samples
if((noutput_items == 0) || (ninput_items[0] == 0))
{
LOG(WARNING) << "noutput_items = 0";
}
return 1; //output tracking result ALWAYS even in the case of d_enable_tracking==false
}

View File

@ -375,7 +375,7 @@ void Galileo_E5a_Dll_Pll_Tracking_cc::acquire_secondary()
}
int Galileo_E5a_Dll_Pll_Tracking_cc::general_work (int noutput_items, gr_vector_int &ninput_items,
int Galileo_E5a_Dll_Pll_Tracking_cc::general_work (int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
{
// process vars
@ -793,10 +793,6 @@ int Galileo_E5a_Dll_Pll_Tracking_cc::general_work (int noutput_items, gr_vector_
d_secondary_delay = (d_secondary_delay + 1) % Galileo_E5a_Q_SECONDARY_CODE_LENGTH;
d_sample_counter += d_current_prn_length_samples; //count for the processed samples
consume_each(d_current_prn_length_samples); // this is necessary in gr::block derivates
if((noutput_items == 0) || (ninput_items[0] == 0))
{
LOG(WARNING) << "noutput_items = 0";
}
return 1; //output tracking result ALWAYS even in the case of d_enable_tracking==false
}

View File

@ -320,7 +320,7 @@ gps_l1_ca_dll_pll_c_aid_tracking_cc::~gps_l1_ca_dll_pll_c_aid_tracking_cc()
int gps_l1_ca_dll_pll_c_aid_tracking_cc::general_work (int noutput_items, gr_vector_int &ninput_items,
int gps_l1_ca_dll_pll_c_aid_tracking_cc::general_work (int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
{
// Block input data and block output stream pointers
@ -712,10 +712,6 @@ int gps_l1_ca_dll_pll_c_aid_tracking_cc::general_work (int noutput_items, gr_vec
consume_each(d_correlation_length_samples); // this is necessary in gr::block derivates
d_sample_counter += d_correlation_length_samples; //count for the processed samples
if((noutput_items == 0) || (ninput_items[0] == 0))
{
LOG(WARNING) << "noutput_items = 0";
}
return 1; //output tracking result ALWAYS even in the case of d_enable_tracking==false
}

View File

@ -294,7 +294,7 @@ gps_l1_ca_dll_pll_c_aid_tracking_sc::~gps_l1_ca_dll_pll_c_aid_tracking_sc()
int gps_l1_ca_dll_pll_c_aid_tracking_sc::general_work (int noutput_items, gr_vector_int &ninput_items,
int gps_l1_ca_dll_pll_c_aid_tracking_sc::general_work (int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
{
// Block input data and block output stream pointers
@ -567,10 +567,6 @@ int gps_l1_ca_dll_pll_c_aid_tracking_sc::general_work (int noutput_items, gr_vec
consume_each(d_correlation_length_samples); // this is necessary in gr::block derivates
d_sample_counter += d_correlation_length_samples; //count for the processed samples
if((noutput_items == 0) || (ninput_items[0] == 0))
{
LOG(WARNING) << "noutput_items = 0";
}
return 1; //output tracking result ALWAYS even in the case of d_enable_tracking==false
}

View File

@ -549,10 +549,6 @@ int Gps_L1_Ca_Dll_Pll_Tracking_cc::general_work (int noutput_items __attribute__
consume_each(d_current_prn_length_samples); // this is necessary in gr::block derivates
d_sample_counter += d_current_prn_length_samples; //count for the processed samples
// if((noutput_items == 0) || (ninput_items[0] == 0))
// {
// LOG(WARNING) << "noutput_items = 0";
// }
return 1; //output tracking result ALWAYS even in the case of d_enable_tracking==false
}

View File

@ -290,7 +290,7 @@ Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::~Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc()
int Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::general_work (int noutput_items, gr_vector_int &ninput_items,
int Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::general_work (int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
{
// Block input data and block output stream pointers
@ -571,10 +571,6 @@ int Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::general_work (int noutput_items, gr_vecto
consume_each(d_correlation_length_samples); // this is necessary in gr::block derivates
d_sample_counter += d_correlation_length_samples; //count for the processed samples
if((noutput_items == 0) || (ninput_items[0] == 0))
{
LOG(WARNING) << "noutput_items = 0";
}
return 1; //output tracking result ALWAYS even in the case of d_enable_tracking==false
}

View File

@ -299,7 +299,7 @@ Gps_L1_Ca_Tcp_Connector_Tracking_cc::~Gps_L1_Ca_Tcp_Connector_Tracking_cc()
multicorrelator_cpu.free();
}
int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work (int noutput_items, gr_vector_int &ninput_items,
int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work (int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
{
// process vars
@ -585,10 +585,7 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work (int noutput_items, gr_vec
consume_each(d_current_prn_length_samples); // this is necessary in gr::block derivates
d_sample_counter_seconds = d_sample_counter_seconds + ( ((double)d_current_prn_length_samples) / (double)d_fs_in );
d_sample_counter += d_current_prn_length_samples; //count for the processed samples
if((noutput_items == 0) || (ninput_items[0] == 0))
{
LOG(WARNING) << "noutput_items = 0";
}
return 1; //output tracking result ALWAYS even in the case of d_enable_tracking==false
}

View File

@ -286,7 +286,7 @@ gps_l2_m_dll_pll_tracking_cc::~gps_l2_m_dll_pll_tracking_cc()
int gps_l2_m_dll_pll_tracking_cc::general_work (int noutput_items, gr_vector_int &ninput_items,
int gps_l2_m_dll_pll_tracking_cc::general_work (int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
{
// process vars
@ -559,10 +559,6 @@ int gps_l2_m_dll_pll_tracking_cc::general_work (int noutput_items, gr_vector_int
}
consume_each(d_current_prn_length_samples); // this is necessary in gr::block derivates
d_sample_counter += d_current_prn_length_samples; //count for the processed samples
if((noutput_items == 0) || (ninput_items[0] == 0))
{
LOG(WARNING) << "noutput_items = 0";
}
return 1; //output tracking result ALWAYS even in the case of d_enable_tracking==false
}