Project

General

Profile

Actions

Bug #5847

closed

-Wmaybe-uninitialized when building --with-mstrx

Added by fixeria about 1 month ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
12/28/2022
Due date:
% Done:

0%

Spec Reference:

Description

I am seeing these warnings when building osmo-trx-ms with gcc v12.2.0:

In file included from ms/ms.h:42,
                 from ms/ms_upper.cpp:23:
In member function ‘bool spsc_detail::spsc<SZ, ELEM, block_read, block_write, T>::spsc_push(const ELEM*) [with unsigned int SZ = 8; ELEM = trxcon::internal_q_tx_buf; boo
l block_read = true; bool block_write = false; T = spsc_detail::spsc_cond_detail]’,
    inlined from ‘void sighandler(int)’ at ms/ms_upper.cpp:454:24,
    inlined from ‘void sighandler(int)’ at ms/ms_upper.cpp:444:6:
ms/itrq.h:154:17: warning: ‘b’ may be used uninitialized [-Wmaybe-uninitialized]
  154 |                 buf[cur_wp] = *elem;
      |                 ^~~
ms/ms_upper.cpp: In function ‘void sighandler(int)’:
ms/ms_upper.cpp:453:43: note: ‘b’ declared here
  453 |                 trxcon::internal_q_tx_buf b;
      |                                           ^
In member function ‘bool spsc_detail::spsc<SZ, ELEM, block_read, block_write, T>::spsc_push(const ELEM*) [with unsigned int SZ = 8; ELEM = trxcon::trxcon_phyif_cmd; bool
 block_read = true; bool block_write = false; T = spsc_detail::spsc_cond_detail]’,
    inlined from ‘void sighandler(int)’ at ms/ms_upper.cpp:455:32,
    inlined from ‘void sighandler(int)’ at ms/ms_upper.cpp:444:6:
ms/itrq.h:154:17: warning: ‘cmd’ may be used uninitialized [-Wmaybe-uninitialized]
  154 |                 buf[cur_wp] = *elem;
      |                 ^~~
ms/ms_upper.cpp: In function ‘void sighandler(int)’:
ms/ms_upper.cpp:452:42: note: ‘cmd’ declared here
  452 |                 trxcon::trxcon_phyif_cmd cmd;
      |

Related issues

Related to OsmocomBB - Feature #5599: trxcon: integrate with osmo-trx-msClosedHoernchen07/01/2022

Actions
Actions #1

Updated by fixeria about 1 month ago

  • Related to Feature #5599: trxcon: integrate with osmo-trx-ms added
Actions #2

Updated by Hoernchen about 1 month ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)