Date: Tue, 03 Sep 2024 14:00:32 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 281247] sysutils/grub2-pcbsd: Fails to build with GCC 14: error: passing argument 1 of 'grub_util_check_geom_label' from incompatible pointer type [-Wincompatible-pointer-types] Message-ID: <bug-281247-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D281247 Bug ID: 281247 Summary: sysutils/grub2-pcbsd: Fails to build with GCC 14: error: passing argument 1 of 'grub_util_check_geom_label' from incompatible pointer type [-Wincompatible-pointer-types] Product: Ports & Packages Version: Latest Hardware: Any URL: https://pkg-status.freebsd.org/gohan04/data/140amd64-d efault-foo/2024-08-29_19h57m48s/logs/errors/grub2-pcbs d-2.02q_19.log OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: ports-bugs@FreeBSD.org Reporter: salvadore@freebsd.org Blocks: 281091 Build fails with GCC 14. This blocks GCC_DEFAULT update to GCC 14. gcc14 -DHAVE_CONFIG_H -I. -Wall -W -DGRUB_UTIL=3D1 -D_FILE_OFFSET_BITS=3D64 -I./include -DGRUB_FILE=3D\"grub-core/osdep/unix/getroot.c\" -I. -I. -I. -I. -I./include -I./include -I./grub-core/lib/libgcrypt-grub/src/=20 -I./grub-core/gnulib -I./grub-core/gnulib -I/usr/local/include -D_FILE_OFFSET_BITS=3D64 -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimizati= on -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-= y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parame= ter -Wunused-value -Wunused-variable -Wwrite-strings -Wnested-externs -Wstrict-prototypes -Wcast-align -Wextra -Wattributes -Wendif-labels -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmissing-field-initializers -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast -Wstrict-aliasing -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign -Wmissing-include-= dirs -Wmissing-prototypes -Wmissing-declarations -Wformat=3D2 -Wno-undef -Wno-sign-compare -Wno-unused -Wno-unused-parameter -Wno-redundant-decls -Wno-unreachable-code -Wno-conversion -O2 -pipe=20 -Wl,-rpath=3D/usr/local/lib/gcc14 -fno-strict-aliasing -MT grub-core/osdep/unix/libgrubkern_a-getroot.o -MD -MP -MF grub-core/osdep/unix/.deps-util/libgrubkern_a-getroot.Tpo -c -o grub-core/osdep/unix/libgrubkern_a-getroot.o `test -f 'grub-core/osdep/unix/getroot.c' || echo './'`grub-core/osdep/unix/getroot.c grub-core/osdep/unix/getroot.c: In function 'grub_guess_root_devices': grub-core/osdep/unix/getroot.c:512:37: error: passing argument 1 of 'grub_util_check_geom_label' from incompatible pointer type [-Wincompatible-pointer-types] 512 | if ( grub_util_check_geom_label(os_dev) ) | ^~~~~~ | | | char ** In file included from grub-core/osdep/unix/getroot.c:73: ./include/grub/emu/getroot.h:47:44: note: expected 'const char *' but argum= ent is of type 'char **' 47 | int grub_util_check_geom_label(const char *name); | ~~~~~~~~~~~~^~~~ grub-core/osdep/unix/getroot.c:513:79: error: passing argument 1 of 'grub_util_convert_geom_label_to_dev' from incompatible pointer type [-Wincompatible-pointer-types] 513 | os_dev =3D grub_util_convert_geom_label_to_dev (os_dev + size= of ("/dev/") - 1, 1); |=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20 ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ |=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 | |=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 char ** ./include/grub/emu/getroot.h:48:62: note: expected 'const char *' but argum= ent is of type 'char **' 48 | const char *grub_util_convert_geom_label_to_dev (const char *name, = int *full_path); | ~~~~~~~~~~~~^~~~ grub-core/osdep/unix/getroot.c:513:84: error: passing argument 2 of 'grub_util_convert_geom_label_to_dev' makes pointer from integer without a = cast [-Wint-conversion] 513 | os_dev =3D grub_util_convert_geom_label_to_dev (os_dev + size= of ("/dev/") - 1, 1); |=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 ^ |=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 | |=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 int ./include/grub/emu/getroot.h:48:73: note: expected 'int *' but argument is = of type 'int' 48 | const char *grub_util_convert_geom_label_to_dev (const char *name, = int *full_path); |=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 ~~~~~^~~~~~~~~ grub-core/osdep/unix/getroot.c:513:14: error: assignment to 'char **' from incompatible pointer type 'const char *' [-Wincompatible-pointer-types] 513 | os_dev =3D grub_util_convert_geom_label_to_dev (os_dev + size= of ("/dev/") - 1, 1); | ^ gmake[2]: *** [Makefile:6022: grub-core/osdep/unix/libgrubkern_a-getroot.o] Error 1 gmake[2]: Leaving directory '/wrkdirs/usr/ports/sysutils/grub2-pcbsd/work/grub-2.02' gmake[1]: *** [Makefile:11107: all-recursive] Error 1 gmake[1]: Leaving directory '/wrkdirs/usr/ports/sysutils/grub2-pcbsd/work/grub-2.02' gmake: *** [Makefile:3497: all] Error 2 *** Error code 1 Stop. Full log: https://pkg-status.freebsd.org/gohan04/data/140amd64-default-foo/2024-08-29= _19h57m48s/logs/errors/grub2-pcbsd-2.02q_19.log Useful link: https://gcc.gnu.org/gcc-14/porting_to.html Referenced Bugs: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D281091 [Bug 281091] [exp-run] Update GCC_DEFAULT to 14 etc. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-281247-7788>