Commit 26ef1128 authored by Robert Schmidt's avatar Robert Schmidt

Initialize OAIgraph before usage

Newer GCC releases warn about the scope being uninitialized:

openair1/PHY/TOOLS/nr_phy_scope.c:1076:20: error: ‘graph.text’ is used uninitialized [-Werror=uninitialized]

This is correct, as we don't initialize the scope. This commit correctly
initializes the scope.
parent 537605a6
......@@ -193,7 +193,9 @@ void websrv_setpoint(int x, int y, websrv_scopedata_msg_t *msg)
msg->data_xy[msg->data_xy[0]] = (int16_t)y;
}
#endif
static void commonGraph(OAIgraph_t *graph, int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label, FL_COLOR pointColor) {
static void commonGraph(OAIgraph_t *graph, int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label, FL_COLOR pointColor)
{
memset(graph, 0, sizeof(*graph));
if (type==WATERFALL) {
graph->waterFallh=h-15;
graph->waterFallAvg=malloc(sizeof(*graph->waterFallAvg) * graph->waterFallh);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment