Re: [PATCH v2 2/2] ci: compile "linux-gcc-default" job with -Og
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 7, 2024, 18:48 UTC
- Message-ID
- <xmqqed98d1wn.fsf@gitster.g>
- In-Reply-To
- <bdf0e40a770c57b63e7519983d37b97a85ce07bf.1717662814.git.ps@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
> While we could adapt all jobs to compile with `-Og` now, that would > potentially mask other warnings that only get diagnosed with `-O2`. > Instead, adapt the "linux-gcc-default" job to compile with `-Og`.
It seems that we are already triggering for 'seen'. I haven't checked if that is a false positive or a real problem, though.
https://github.com/git/git/actions/runs/9407652417/job/25913907166#step:4:139
pack-mtimes.c: In function ‘load_pack_mtimes_file’:
Error: pack-mtimes.c:89:25: ‘mtimes_size’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
89 | munmap(data, mtimes_size);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:2757: pack-mtimes.o] Error 1
make: *** Waiting for unfinished jobs....
pack-revindex.c: In function ‘load_revindex_from_disk’:
Error: pack-revindex.c:260:25: ‘revindex_size’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
260 | munmap(data, revindex_size);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:2757: pack-revindex.o] Error 1
cat: exit.status: No such file or directory