From 124debc2c77cb3ad74d2630e4ed76abb59daba81 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 19 Dec 2024 23:51:37 +0100 Subject: [PATCH] Fix warnings in rftest executable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit warning: ‘genericPowerPerAntena’ defined but not used [-Wunused-function] warning: ‘graph.text’ is used uninitialized [-Wuninitialized] warning: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’ [-Wunused-result] --- openair1/PHY/TOOLS/calibration_scope.c | 14 ++++++++++---- openair1/PHY/TOOLS/calibration_test.c | 9 +++++++-- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/openair1/PHY/TOOLS/calibration_scope.c b/openair1/PHY/TOOLS/calibration_scope.c index 6d7723d6d4..c7a305ab27 100644 --- a/openair1/PHY/TOOLS/calibration_scope.c +++ b/openair1/PHY/TOOLS/calibration_scope.c @@ -99,8 +99,9 @@ static void commonGraph(OAIgraph_t *graph, int type, FL_Coord x, FL_Coord y, FL_ } static OAIgraph_t calibrationCommonGraph( void (*funct) (OAIgraph_t *graph, calibData_t *context), - int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label, FL_COLOR pointColor) { - OAIgraph_t graph; + int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label, FL_COLOR pointColor) +{ + OAIgraph_t graph = {0}; commonGraph(&graph, type, x, y, w, h, label, pointColor); graph.funct=funct; return graph; @@ -236,7 +237,9 @@ static void genericWaterFall (OAIgraph_t *graph, scopeSample_t *values, const in graph->iteration++; } -static void genericPowerPerAntena(OAIgraph_t *graph, const int nb_ant, const scopeSample_t **data, const int len) { +__attribute__((unused)) +static void genericPowerPerAntena(OAIgraph_t *graph, const int nb_ant, const scopeSample_t **data, const int len) +{ float *values, *time; oai_xygraph_getbuff(graph, &time, &values, len, 0); @@ -263,7 +266,10 @@ static void gNBfreqWaterFall (OAIgraph_t *graph, calibData_t *context) { 0, 0, "X axis:one frame in time"); } -static void timeResponse (OAIgraph_t *graph, calibData_t *context) { + +__attribute__((unused)) +static void timeResponse (OAIgraph_t *graph, calibData_t *context) +{ #if 0 const int len=2*phy_vars_gnb->frame_parms.ofdm_symbol_size; float *values, *time; diff --git a/openair1/PHY/TOOLS/calibration_test.c b/openair1/PHY/TOOLS/calibration_test.c index 1d8e64ee90..4d88ab542a 100644 --- a/openair1/PHY/TOOLS/calibration_test.c +++ b/openair1/PHY/TOOLS/calibration_test.c @@ -314,8 +314,13 @@ int main(int argc, char **argv) { rfdevice.trx_start_func(&rfdevice); while(!oai_exit) { - for (int i=0; i