On Mon, Mar 07, 2022 at 02:15:49AM -0600, Glenn Washburn wrote: > On Fri, 4 Mar 2022 18:01:10 -0600 > Glenn Washburn <developm...@efficientek.com> wrote: > > > On Wed, 2 Mar 2022 14:08:23 -0500 > > Robbie Harwood <rharw...@redhat.com> wrote: > > > > > Changes this version: > > > > > > - Reorder last two commits so that warning fixes come after the change > > > that > > > introduces them. > > > - Fix comment formatting to comply with grub2 style. > > > > Either I missed it before or something changed. But I'm getting this > > build error now for x86_64-efi, and I'm not getting it without this patch > > series. > > > > In file included from > > /root/grub-tests.update-gnulib/grub/include/grub/disk.h:31 > > , > > from > > /root/grub-tests.update-gnulib/grub/include/grub/file.h:26 > > , > > from > > /root/grub-tests.update-gnulib/grub/include/grub/loader.h: > > 23, > > from > > /root/grub-tests.update-gnulib/grub/grub-core/loader/i386/ > > bsd.c:19: > > /root/grub-tests.update-gnulib/grub/grub-core/loader/i386/bsd.c: In > > function ‘gr > > ub_freebsd_add_meta_module’: > > /root/grub-tests.update-gnulib/grub/include/grub/misc.h:71:10: error: ‘ptr’ > > may be used uninitialized in this function [-Werror=maybe-uninitialized] > > 71 | return grub_memmove (dest, src, n); > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ > > /root/grub-tests.update-gnulib/grub/grub-core/loader/i386/bsd.c:266:9: > > note: ‘ptr’ was declared here > > 266 | void *ptr; > > | ^~~ > > > > Reviewing the code it doesn't look like ptr can actually be used > > uninitialized, so it seems like GCC 10.1.0 isn't smart enough to figure > > that out. Initializing to NULL fixes the build issue. > > For completeness, I just realized that I wasn't using the compiler I > thought I was using. Turns out this issue is with x86_64 Debian 11's > GCC, which is 10.2.1. I don't think this is relevant to the issue, but > may help in reproducing if needed. > > After some more testing, I've narrowed it down to passing -O2 to gcc, > without which the series builds fine.
Thanks for the report. I am just running build tests for all architectures and platforms with GCC 10/11. I have spotted and fixed 2 additional problems. I hope I will post fixes for all of them tomorrow. Robbie and I discovered another gnulib build issue for Windows platforms. I prepared a patch and will share it with Robbie to send it in updated gnulib v9 patchset. Daniel _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel