diff --git a/lib/examples/npdsch_enodeb.c b/lib/examples/npdsch_enodeb.c index 283fb56a9..c909e110b 100644 --- a/lib/examples/npdsch_enodeb.c +++ b/lib/examples/npdsch_enodeb.c @@ -506,7 +506,7 @@ int main(int argc, char** argv) if (srate != -1) { printf("Setting tx sampling rate %.2f MHz\n", (float)srate / 1000000); float srate_rf = srsran_rf_set_tx_srate(&radio, (double)srate); - if (abs(srate - srate_rf) > MAX_SRATE_DELTA) { + if (abs(srate - (int)srate_rf) > MAX_SRATE_DELTA) { ERROR("Could not set tx sampling rate : wanted %d got %f", srate, srate_rf); exit(-1); } diff --git a/lib/examples/pdsch_enodeb.c b/lib/examples/pdsch_enodeb.c index 46f89ee40..d39be21af 100644 --- a/lib/examples/pdsch_enodeb.c +++ b/lib/examples/pdsch_enodeb.c @@ -963,7 +963,7 @@ int main(int argc, char** argv) if (srate != -1) { printf("Setting tx sampling rate %.2f MHz\n", (float)srate / 1000000); float srate_rf = srsran_rf_set_tx_srate(&radio, (double)srate); - if (abs(srate - srate_rf) > MAX_SRATE_DELTA) { + if (abs(srate - (int)srate_rf) > MAX_SRATE_DELTA) { ERROR("Could not set tx sampling rate : wanted %d got %f", srate, srate_rf); exit(-1); } diff --git a/lib/examples/pdsch_ue.c b/lib/examples/pdsch_ue.c index eaed11353..117315141 100644 --- a/lib/examples/pdsch_ue.c +++ b/lib/examples/pdsch_ue.c @@ -502,7 +502,7 @@ int main(int argc, char** argv) if (srate != -1) { printf("Setting rx sampling rate %.2f MHz\n", (float)srate / 1000000); float srate_rf = srsran_rf_set_rx_srate(&rf, (double)srate); - if (abs(srate - srate_rf) > MAX_SRATE_DELTA) { + if (abs(srate - (int)srate_rf) > MAX_SRATE_DELTA) { ERROR("Could not set rx sampling rate : wanted %d got %f", srate, srate_rf); exit(-1); } diff --git a/lib/examples/pssch_ue.c b/lib/examples/pssch_ue.c index efddf66d4..334430554 100644 --- a/lib/examples/pssch_ue.c +++ b/lib/examples/pssch_ue.c @@ -262,7 +262,7 @@ int main(int argc, char** argv) if (srate != -1) { printf("Setting sampling rate %.2f MHz\n", (float)srate / 1000000); float srate_rf = srsran_rf_set_rx_srate(&radio, (double)srate); - if (abs(srate - srate_rf) > MAX_SRATE_DELTA) { + if (abs(srate - (int)srate_rf) > MAX_SRATE_DELTA) { ERROR("Could not set sampling rate : wanted %d got %f", srate, srate_rf); exit(-1); }