[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT PATCH v3 1/5] lib/vfscore, lib/*fs: Ignore incompatible function pointer typecast



Vnode operations are implemented with function calls. In order to stub
some of the operations a no-op function is filled to those struct
entries. Such a stub function just returns an error code that tells that
the functionality is not implemented. However, the function signature
may not match with the stubbed vnode operation, so it is typecasted.
GCC 8 introduces a warning when function pointer typecasts are
incompatible. This patch adds a CFLAG to ignore this warning for
vfscore and all current filesystem implementations.

Signed-off-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>
---
 lib/9pfs/Makefile.uk    | 2 ++
 lib/devfs/Makefile.uk   | 2 ++
 lib/ramfs/Makefile.uk   | 2 ++
 lib/vfscore/Makefile.uk | 2 ++
 4 files changed, 8 insertions(+)

diff --git a/lib/9pfs/Makefile.uk b/lib/9pfs/Makefile.uk
index 9d4dfb57..8a667efa 100644
--- a/lib/9pfs/Makefile.uk
+++ b/lib/9pfs/Makefile.uk
@@ -1,4 +1,6 @@
 $(eval $(call addlib_s,lib9pfs,$(CONFIG_LIB9PFS)))
 
+LIB9PFS_CFLAGS-$(call gcc_version_ge,8,0) += -Wno-cast-function-type
+
 LIB9PFS_SRCS-y += $(LIB9PFS_BASE)/9pfs_vfsops.c
 LIB9PFS_SRCS-y += $(LIB9PFS_BASE)/9pfs_vnops.c
diff --git a/lib/devfs/Makefile.uk b/lib/devfs/Makefile.uk
index f89e6577..c496fd56 100644
--- a/lib/devfs/Makefile.uk
+++ b/lib/devfs/Makefile.uk
@@ -2,5 +2,7 @@ $(eval $(call addlib_s,libdevfs,$(CONFIG_LIBDEVFS)))
 
 CINCLUDES-y += -I$(LIBDEVFS_BASE)/include
 
+LIBDEVFS_CFLAGS-$(call gcc_version_ge,8,0) += -Wno-cast-function-type
+
 LIBDEVFS_SRCS-y += $(LIBDEVFS_BASE)/device.c
 LIBDEVFS_SRCS-y += $(LIBDEVFS_BASE)/devfs_vnops.c
diff --git a/lib/ramfs/Makefile.uk b/lib/ramfs/Makefile.uk
index 9a443358..bec0a957 100644
--- a/lib/ramfs/Makefile.uk
+++ b/lib/ramfs/Makefile.uk
@@ -1,4 +1,6 @@
 $(eval $(call addlib_s,libramfs,$(CONFIG_LIBRAMFS)))
 
+LIBRAMFS_CFLAGS-$(call gcc_version_ge,8,0) += -Wno-cast-function-type
+
 LIBRAMFS_SRCS-y += $(LIBRAMFS_BASE)/ramfs_vfsops.c
 LIBRAMFS_SRCS-y += $(LIBRAMFS_BASE)/ramfs_vnops.c
diff --git a/lib/vfscore/Makefile.uk b/lib/vfscore/Makefile.uk
index e36c9217..1e5fc114 100644
--- a/lib/vfscore/Makefile.uk
+++ b/lib/vfscore/Makefile.uk
@@ -2,6 +2,8 @@ $(eval $(call addlib_s,libvfscore,$(CONFIG_LIBVFSCORE)))
 
 CINCLUDES-y += -I$(LIBVFSCORE_BASE)/include
 
+LIBVFSCORE_CFLAGS-$(call gcc_version_ge,8,0) += -Wno-cast-function-type
+
 LIBVFSCORE_SRCS-y += $(LIBVFSCORE_BASE)/fd.c
 LIBVFSCORE_SRCS-y += $(LIBVFSCORE_BASE)/file.c
 LIBVFSCORE_SRCS-y += $(LIBVFSCORE_BASE)/stdio.c
-- 
2.20.1


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.