Actions
Bug #6190
closedwarning: 'tmp_first_tfi' may be used uninitialized [-Wmaybe-uninitialized]
Start date:
09/24/2023
Due date:
% Done:
0%
Spec Reference:
Description
Seen when building recent osmo-pcu with gcc v13.2.1:
In file included from ../../../src/osmo-pcu/src/gprs_debug.h:21, from ../../../src/osmo-pcu/src/tbf.h:26, from ../../../src/osmo-pcu/src/pdch.h:31, from ../../../src/osmo-pcu/src/bts.h:20, from ../../../src/osmo-pcu/src/bts.cpp:21: ../../../src/osmo-pcu/src/bts.cpp: In function 'int bts_tfi_find_free(const gprs_rlcmac_bts*, gprs_rlcmac_tbf_direction, uint8_t*, int8_t)': /opt/osmocom/include/osmocom/core/logging.h:107:42: warning: 'tmp_first_tfi' may be used uninitialized [-Wmaybe-uninitialized] 107 | logp_stub(__FILE__, __LINE__, cont, fmt, ##args); \ | ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/osmocom/include/osmocom/core/logging.h:85:9: note: in expansion of macro 'LOGPSRCC' 85 | LOGPSRCC(ss, level, caller_file, caller_line, 0, fmt, ##args) | ^~~~~~~~ /opt/osmocom/include/osmocom/core/logging.h:50:9: note: in expansion of macro 'LOGPSRC' 50 | LOGPSRC(ss, level, NULL, 0, fmt, ## args) | ^~~~~~~ ../../../src/osmo-pcu/src/bts.cpp:663:9: note: in expansion of macro 'LOGP' 663 | LOGP(DRLCMAC, LOGL_DEBUG, "Found first unallocated TRX=%d TFI=%d\n", | ^~~~ ../../../src/osmo-pcu/src/bts.cpp:645:25: note: 'tmp_first_tfi' was declared here 645 | uint8_t tmp_first_tfi; | ^~~~~~~~~~~~~
Actions