Well, that's not what the GCC developers think. The warning is there in GCC 9 and GCC 11 as well. The name of the option even implies that this is a "maybe". Forcing it to become an error with -Werror might be wrong, so if you build with -Werrer, build with -Wno-error=maybe-uninitialized as well.
On 3/2/21 3:46 PM, Joël Krähemann wrote: > Hi, > > This is not a GSequencer bug! > > This behavior is wanted. > > delta_time was properly initialized in ags_midi_buffer_util_seek_message(). > > it would be wrong if delta_time was overridden by > ags_midi_buffer_util_get_varlength(). > it does only return 0 length so varlength shall not be set. > > If you output 0 length, this means you can't use return location, so why > should I set it? > > regards, > Joël > > On Tue, Mar 2, 2021 at 1:45 PM Matthias Klose <d...@debian.org> wrote: >> >> Package: src:gsequencer >> Version: 3.7.38-1 >> Severity: important >> Tags: sid bullseye >> X-Debbugs-CC: Joël Krähemann <jkraehem...@gmail.com> >> >> gsequencer ftbfs with -Werror=maybe-uninitialized, with gcc-10 and gcc-11 >> from >> experimental. >> >> ags/audio/midi/ags_midi_buffer_util.c:2606:17: error: ‘current_delta_time’ >> may >> be used uninitialized in this function [-Werror=maybe-uninitialized] >> 2606 | *delta_time = current_delta_time; >> | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ >> cc1: some warnings being treated as errors >> >> You don't see the error in a build log, because the libtool output is >> redirected >> to /dev/null. >> >> Forwarded to https://gcc.gnu.org/PR99340 >> >> The warning is only seen with -fPIE, not -fPIC, which is a bug in GCC. >> >> The warning itself is correct, ags_midi_buffer_util_get_varlength doesn't >> always >> return a value in varlength.