[Libguestfs] [PATCH 3/7] build: stop using GUESTFS_WARN_DEPRECATED

Pino Toscano ptoscano at redhat.com
Tue Apr 23 16:28:12 UTC 2019


This is no more used now, as compiler deprecation warnings are triggered
by default.
---
 align/Makefile.am             | 1 -
 cat/Makefile.am               | 5 -----
 common/edit/Makefile.am       | 1 -
 common/options/Makefile.am    | 1 -
 common/parallel/Makefile.am   | 1 -
 common/progress/Makefile.am   | 1 -
 common/structs/Makefile.am    | 1 -
 common/utils/Makefile.am      | 1 -
 common/visit/Makefile.am      | 1 -
 common/windows/Makefile.am    | 1 -
 df/Makefile.am                | 1 -
 diff/Makefile.am              | 1 -
 edit/Makefile.am              | 1 -
 examples/Makefile.am          | 9 ---------
 fish/Makefile.am              | 1 -
 format/Makefile.am            | 1 -
 fuse/Makefile.am              | 1 -
 inspector/Makefile.am         | 1 -
 lib/Makefile.am               | 1 -
 make-fs/Makefile.am           | 1 -
 rescue/Makefile.am            | 1 -
 test-tool/Makefile.am         | 1 -
 tests/c-api/tests-main.c      | 5 -----
 tests/mount-local/Makefile.am | 1 -
 tests/mountable/Makefile.am   | 1 -
 tests/parallel/Makefile.am    | 1 -
 26 files changed, 42 deletions(-)

diff --git a/align/Makefile.am b/align/Makefile.am
index cc8df13f7..6c6fdc455 100644
--- a/align/Makefile.am
+++ b/align/Makefile.am
@@ -29,7 +29,6 @@ virt_alignment_scan_SOURCES = \
 	scan.c
 
 virt_alignment_scan_CPPFLAGS = \
-	-DGUESTFS_WARN_DEPRECATED=1 \
 	-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
 	-I$(top_srcdir)/common/structs -I$(top_builddir)/common/structs \
 	-I$(top_srcdir)/lib -I$(top_builddir)/lib \
diff --git a/cat/Makefile.am b/cat/Makefile.am
index 9fee8cc1c..b4da82bbe 100644
--- a/cat/Makefile.am
+++ b/cat/Makefile.am
@@ -36,7 +36,6 @@ virt_cat_SOURCES = \
 	cat.c
 
 virt_cat_CPPFLAGS = \
-	-DGUESTFS_WARN_DEPRECATED=1 \
 	-DLOCALEBASEDIR=\""$(datadir)/locale"\" \
 	-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
 	-I$(top_srcdir)/common/structs -I$(top_builddir)/common/structs \
@@ -64,7 +63,6 @@ virt_filesystems_SOURCES = \
 	filesystems.c
 
 virt_filesystems_CPPFLAGS = \
-	-DGUESTFS_WARN_DEPRECATED=1 \
 	-DLOCALEBASEDIR=\""$(datadir)/locale"\" \
 	-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
 	-I$(top_srcdir)/common/structs -I$(top_builddir)/common/structs \
@@ -92,7 +90,6 @@ virt_log_SOURCES = \
 	log.c
 
 virt_log_CPPFLAGS = \
-	-DGUESTFS_WARN_DEPRECATED=1 \
 	-DLOCALEBASEDIR=\""$(datadir)/locale"\" \
 	-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
 	-I$(top_srcdir)/common/structs -I$(top_builddir)/common/structs \
@@ -119,7 +116,6 @@ virt_ls_SOURCES = \
 	ls.c
 
 virt_ls_CPPFLAGS = \
-	-DGUESTFS_WARN_DEPRECATED=1 \
 	-DLOCALEBASEDIR=\""$(datadir)/locale"\" \
 	-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
 	-I$(top_srcdir)/common/structs -I$(top_builddir)/common/structs \
@@ -148,7 +144,6 @@ virt_tail_SOURCES = \
 	tail.c
 
 virt_tail_CPPFLAGS = \
-	-DGUESTFS_WARN_DEPRECATED=1 \
 	-DLOCALEBASEDIR=\""$(datadir)/locale"\" \
 	-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
 	-I$(top_srcdir)/common/structs -I$(top_builddir)/common/structs \
diff --git a/common/edit/Makefile.am b/common/edit/Makefile.am
index d31d57268..8371a6aac 100644
--- a/common/edit/Makefile.am
+++ b/common/edit/Makefile.am
@@ -25,7 +25,6 @@ libedit_la_SOURCES = \
 	file-edit.c \
 	file-edit.h
 libedit_la_CPPFLAGS = \
-	-DGUESTFS_WARN_DEPRECATED=1 \
 	-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
 	-I$(top_srcdir)/lib -I$(top_builddir)/lib
 libedit_la_CFLAGS = \
diff --git a/common/options/Makefile.am b/common/options/Makefile.am
index d7c036fb8..23a13d928 100644
--- a/common/options/Makefile.am
+++ b/common/options/Makefile.am
@@ -34,7 +34,6 @@ liboptions_la_SOURCES = \
 	uri.h \
 	uri.c
 liboptions_la_CPPFLAGS = \
-	-DGUESTFS_WARN_DEPRECATED=1 \
 	-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
 	-I$(top_srcdir)/lib -I$(top_builddir)/lib \
 	-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib
diff --git a/common/parallel/Makefile.am b/common/parallel/Makefile.am
index 6df910037..5254e1723 100644
--- a/common/parallel/Makefile.am
+++ b/common/parallel/Makefile.am
@@ -30,7 +30,6 @@ libparallel_la_SOURCES = \
 	parallel.c \
 	parallel.h
 libparallel_la_CPPFLAGS = \
-	-DGUESTFS_WARN_DEPRECATED=1 \
 	-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
 	-I$(top_srcdir)/lib -I$(top_builddir)/lib \
 	-I$(top_srcdir)/common/options -I$(top_builddir)/common/options \
diff --git a/common/progress/Makefile.am b/common/progress/Makefile.am
index 794215c6e..acb210327 100644
--- a/common/progress/Makefile.am
+++ b/common/progress/Makefile.am
@@ -25,7 +25,6 @@ libprogress_la_SOURCES = \
 	progress.c \
 	progress.h
 libprogress_la_CPPFLAGS = \
-	-DGUESTFS_WARN_DEPRECATED=1 \
 	-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
 	-I$(top_srcdir)/lib -I$(top_builddir)/lib
 libprogress_la_CFLAGS = \
diff --git a/common/structs/Makefile.am b/common/structs/Makefile.am
index 1762af276..228bcb0f3 100644
--- a/common/structs/Makefile.am
+++ b/common/structs/Makefile.am
@@ -35,7 +35,6 @@ libstructs_la_SOURCES = \
 	../../lib/guestfs.h \
 	$(BUILT_SOURCES)
 libstructs_la_CPPFLAGS = \
-	-DGUESTFS_WARN_DEPRECATED=1 \
 	-DGUESTFS_PRIVATE=1 \
 	-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib \
 	-I$(top_srcdir)/lib -I$(top_builddir)/lib
diff --git a/common/utils/Makefile.am b/common/utils/Makefile.am
index a0154d85f..1849dbb27 100644
--- a/common/utils/Makefile.am
+++ b/common/utils/Makefile.am
@@ -29,7 +29,6 @@ libutils_la_SOURCES = \
 	libxml2-writer-macros.h \
 	utils.c
 libutils_la_CPPFLAGS = \
-	-DGUESTFS_WARN_DEPRECATED=1 \
 	-DGUESTFS_PRIVATE=1 \
 	-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib \
 	-I$(top_srcdir)/lib -I$(top_builddir)/lib
diff --git a/common/visit/Makefile.am b/common/visit/Makefile.am
index 8b9136780..62fee334c 100644
--- a/common/visit/Makefile.am
+++ b/common/visit/Makefile.am
@@ -23,7 +23,6 @@ libvisit_la_SOURCES = \
 	visit.c \
 	visit.h
 libvisit_la_CPPFLAGS = \
-	-DGUESTFS_WARN_DEPRECATED=1 \
 	-DGUESTFS_PRIVATE=1 \
 	-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib \
 	-I$(top_srcdir)/lib -I$(top_builddir)/lib \
diff --git a/common/windows/Makefile.am b/common/windows/Makefile.am
index 23b712b45..14f9ec7f4 100644
--- a/common/windows/Makefile.am
+++ b/common/windows/Makefile.am
@@ -25,7 +25,6 @@ libwindows_la_SOURCES = \
 	windows.c \
 	windows.h
 libwindows_la_CPPFLAGS = \
-	-DGUESTFS_WARN_DEPRECATED=1 \
 	-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
 	-I$(top_srcdir)/lib -I$(top_builddir)/lib \
 	-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib
diff --git a/df/Makefile.am b/df/Makefile.am
index 89ec12a64..bba54500e 100644
--- a/df/Makefile.am
+++ b/df/Makefile.am
@@ -33,7 +33,6 @@ virt_df_SOURCES = \
 	output.c
 
 virt_df_CPPFLAGS = \
-	-DGUESTFS_WARN_DEPRECATED=1 \
 	-DLOCALEBASEDIR=\""$(datadir)/locale"\" \
 	-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
 	-I$(top_srcdir)/common/structs -I$(top_builddir)/common/structs \
diff --git a/diff/Makefile.am b/diff/Makefile.am
index 574981f8b..8db8aca72 100644
--- a/diff/Makefile.am
+++ b/diff/Makefile.am
@@ -28,7 +28,6 @@ virt_diff_SOURCES = \
 	diff.c
 
 virt_diff_CPPFLAGS = \
-	-DGUESTFS_WARN_DEPRECATED=1 \
 	-DLOCALEBASEDIR=\""$(datadir)/locale"\" \
 	-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
 	-I$(top_srcdir)/lib -I$(top_builddir)/lib \
diff --git a/edit/Makefile.am b/edit/Makefile.am
index 85615719c..fd9887949 100644
--- a/edit/Makefile.am
+++ b/edit/Makefile.am
@@ -28,7 +28,6 @@ virt_edit_SOURCES = \
 	edit.c
 
 virt_edit_CPPFLAGS = \
-	-DGUESTFS_WARN_DEPRECATED=1 \
 	-DLOCALEBASEDIR=\""$(datadir)/locale"\" \
 	-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
 	-I$(top_srcdir)/lib -I$(top_builddir)/lib \
diff --git a/examples/Makefile.am b/examples/Makefile.am
index c596ce17f..81a8cc0b7 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -43,7 +43,6 @@ endif
 if HAVE_LIBVIRT
 copy_over_SOURCES = copy-over.c
 copy_over_CPPFLAGS = \
-	-DGUESTFS_WARN_DEPRECATED=1 \
 	-I$(top_srcdir)/lib -I$(top_builddir)/lib
 copy_over_CFLAGS = \
 	$(LIBVIRT_CFLAGS) \
@@ -55,7 +54,6 @@ copy_over_LDADD = \
 
 libvirt_auth_SOURCES = libvirt-auth.c
 libvirt_auth_CPPFLAGS = \
-	-DGUESTFS_WARN_DEPRECATED=1 \
 	-I$(top_srcdir)/lib -I$(top_builddir)/lib
 libvirt_auth_CFLAGS = \
 	$(LIBVIRT_CFLAGS) \
@@ -68,7 +66,6 @@ endif
 
 create_disk_SOURCES = create-disk.c
 create_disk_CPPFLAGS = \
-	-DGUESTFS_WARN_DEPRECATED=1 \
 	-I$(top_srcdir)/lib -I$(top_builddir)/lib
 create_disk_CFLAGS = \
 	$(WARN_CFLAGS) $(WERROR_CFLAGS)
@@ -77,7 +74,6 @@ create_disk_LDADD = \
 
 debug_logging_SOURCES = debug-logging.c
 debug_logging_CPPFLAGS = \
-	-DGUESTFS_WARN_DEPRECATED=1 \
 	-I$(top_srcdir)/lib -I$(top_builddir)/lib
 debug_logging_CFLAGS = \
 	$(WARN_CFLAGS) $(WERROR_CFLAGS)
@@ -86,7 +82,6 @@ debug_logging_LDADD = \
 
 display_icon_SOURCES = display-icon.c
 display_icon_CPPFLAGS = \
-	-DGUESTFS_WARN_DEPRECATED=1 \
 	-I$(top_srcdir)/lib -I$(top_builddir)/lib
 display_icon_CFLAGS = \
 	$(WARN_CFLAGS) $(WERROR_CFLAGS)
@@ -95,7 +90,6 @@ display_icon_LDADD = \
 
 inspect_vm_SOURCES = inspect-vm.c
 inspect_vm_CPPFLAGS = \
-	-DGUESTFS_WARN_DEPRECATED=1 \
 	-I$(top_srcdir)/lib -I$(top_builddir)/lib
 inspect_vm_CFLAGS = \
 	$(WARN_CFLAGS) $(WERROR_CFLAGS)
@@ -105,10 +99,8 @@ inspect_vm_LDADD = \
 if HAVE_FUSE
 mount_local_SOURCES = mount-local.c
 mount_local_CPPFLAGS = \
-	-DGUESTFS_WARN_DEPRECATED=1 \
 	-I$(top_srcdir)/lib -I$(top_builddir)/lib
 mount_local_CFLAGS = \
-	-DGUESTFS_WARN_DEPRECATED=1 \
 	-I$(top_srcdir)/lib -I$(top_builddir)/lib \
 	$(FUSE_CFLAGS) \
 	$(WARN_CFLAGS) $(WERROR_CFLAGS)
@@ -120,7 +112,6 @@ endif
 if HAVE_HIVEX
 virt_dhcp_address_SOURCES = virt-dhcp-address.c
 virt_dhcp_address_CPPFLAGS = \
-	-DGUESTFS_WARN_DEPRECATED=1 \
 	-I$(top_srcdir)/lib -I$(top_builddir)/lib
 virt_dhcp_address_CFLAGS = \
 	$(WARN_CFLAGS) $(WERROR_CFLAGS)
diff --git a/fish/Makefile.am b/fish/Makefile.am
index aa8e5add8..001cd0ddf 100644
--- a/fish/Makefile.am
+++ b/fish/Makefile.am
@@ -123,7 +123,6 @@ cmds-gperf.c: cmds-gperf.gperf
 	mv $@-t $@
 
 guestfish_CPPFLAGS = \
-	-DGUESTFS_WARN_DEPRECATED=1 \
 	-DLOCALEBASEDIR=\""$(datadir)/locale"\" \
 	-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
 	-I$(top_srcdir)/common/structs -I$(top_builddir)/common/structs \
diff --git a/format/Makefile.am b/format/Makefile.am
index 2d3cc774c..71876fd90 100644
--- a/format/Makefile.am
+++ b/format/Makefile.am
@@ -28,7 +28,6 @@ virt_format_SOURCES = \
 	format.c
 
 virt_format_CPPFLAGS = \
-	-DGUESTFS_WARN_DEPRECATED=1 \
 	-DLOCALEBASEDIR=\""$(datadir)/locale"\" \
 	-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
 	-I$(top_srcdir)/lib -I$(top_builddir)/lib \
diff --git a/fuse/Makefile.am b/fuse/Makefile.am
index 57f342dd7..408f77a6a 100644
--- a/fuse/Makefile.am
+++ b/fuse/Makefile.am
@@ -36,7 +36,6 @@ guestmount_SOURCES = \
 	guestmount.c
 
 guestmount_CPPFLAGS = \
-	-DGUESTFS_WARN_DEPRECATED=1 \
 	-DLOCALEBASEDIR=\""$(datadir)/locale"\" \
 	-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
 	-I$(top_srcdir)/lib -I$(top_builddir)/lib \
diff --git a/inspector/Makefile.am b/inspector/Makefile.am
index 185a9e857..b1604d8c1 100644
--- a/inspector/Makefile.am
+++ b/inspector/Makefile.am
@@ -49,7 +49,6 @@ virt_inspector_SOURCES = \
 	inspector.c
 
 virt_inspector_CPPFLAGS = \
-	-DGUESTFS_WARN_DEPRECATED=1 \
 	-DLOCALEBASEDIR=\""$(datadir)/locale"\" \
 	-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
 	-I$(top_srcdir)/common/structs -I$(top_builddir)/common/structs \
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 742b182cc..95b5edb4e 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -126,7 +126,6 @@ libguestfs_la_SOURCES = \
 	libguestfs.syms
 
 libguestfs_la_CPPFLAGS = \
-	-DGUESTFS_WARN_DEPRECATED=1 \
 	-DGUESTFS_PRIVATE=1 \
 	-I$(top_srcdir)/common/errnostring -I$(top_builddir)/common/errnostring \
 	-I$(top_srcdir)/common/protocol -I$(top_builddir)/common/protocol \
diff --git a/make-fs/Makefile.am b/make-fs/Makefile.am
index 5ba5fb577..6190fa78a 100644
--- a/make-fs/Makefile.am
+++ b/make-fs/Makefile.am
@@ -28,7 +28,6 @@ virt_make_fs_SOURCES = \
 	make-fs.c
 
 virt_make_fs_CPPFLAGS = \
-	-DGUESTFS_WARN_DEPRECATED=1 \
 	-DLOCALEBASEDIR=\""$(datadir)/locale"\" \
 	-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
 	-I$(top_srcdir)/common/structs -I$(top_builddir)/common/structs \
diff --git a/rescue/Makefile.am b/rescue/Makefile.am
index d911484fd..2851ed52e 100644
--- a/rescue/Makefile.am
+++ b/rescue/Makefile.am
@@ -32,7 +32,6 @@ virt_rescue_SOURCES = \
 	suggest.c
 
 virt_rescue_CPPFLAGS = \
-	-DGUESTFS_WARN_DEPRECATED=1 \
 	-DGUESTFS_PRIVATE=1 \
 	-DLOCALEBASEDIR=\""$(datadir)/locale"\" \
 	-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
diff --git a/test-tool/Makefile.am b/test-tool/Makefile.am
index 065c8a2fa..36a6c9788 100644
--- a/test-tool/Makefile.am
+++ b/test-tool/Makefile.am
@@ -33,7 +33,6 @@ libguestfs_test_tool_CPPFLAGS = \
 	-I$(top_srcdir)/lib -I$(top_builddir)/lib \
 	-I$(top_srcdir)/common/options -I$(top_builddir)/common/options \
 	-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib \
-	-DGUESTFS_WARN_DEPRECATED=1 \
 	-DLOCALEBASEDIR=\""$(datadir)/locale"\"
 
 libguestfs_test_tool_CFLAGS = \
diff --git a/tests/c-api/tests-main.c b/tests/c-api/tests-main.c
index 14e7798ee..9bfb09f06 100644
--- a/tests/c-api/tests-main.c
+++ b/tests/c-api/tests-main.c
@@ -31,11 +31,6 @@
 
 #include <pcre.h>
 
-/* Warn about deprecated libguestfs functions, but only in this file,
- * not in 'tests.c' (because we want to test deprecated functions).
- */
-#define GUESTFS_WARN_DEPRECATED 1
-
 #include "guestfs.h"
 #include "guestfs-utils.h"
 #include "structs-cleanups.h"
diff --git a/tests/mount-local/Makefile.am b/tests/mount-local/Makefile.am
index 7d90bd022..f36cd81ba 100644
--- a/tests/mount-local/Makefile.am
+++ b/tests/mount-local/Makefile.am
@@ -29,7 +29,6 @@ check_PROGRAMS = $(TESTS)
 test_parallel_mount_local_SOURCES = \
 	test-parallel-mount-local.c
 test_parallel_mount_local_CPPFLAGS = \
-	-DGUESTFS_WARN_DEPRECATED=1 \
 	-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib \
 	-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
 	-I$(top_srcdir)/lib -I$(top_builddir)/lib \
diff --git a/tests/mountable/Makefile.am b/tests/mountable/Makefile.am
index c1a1ebf89..058b6856a 100644
--- a/tests/mountable/Makefile.am
+++ b/tests/mountable/Makefile.am
@@ -27,7 +27,6 @@ check_PROGRAMS = test-internal-parse-mountable
 
 test_internal_parse_mountable_SOURCES = test-internal-parse-mountable.c
 test_internal_parse_mountable_CPPFLAGS = \
-	-DGUESTFS_WARN_DEPRECATED=1 \
 	-DGUESTFS_PRIVATE=1 \
 	-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib \
 	-I$(top_srcdir)/lib -I$(top_builddir)/lib
diff --git a/tests/parallel/Makefile.am b/tests/parallel/Makefile.am
index 7f6144089..3ea284ab5 100644
--- a/tests/parallel/Makefile.am
+++ b/tests/parallel/Makefile.am
@@ -26,7 +26,6 @@ check_PROGRAMS = test-parallel
 
 test_parallel_SOURCES = test-parallel.c
 test_parallel_CPPFLAGS = \
-	-DGUESTFS_WARN_DEPRECATED=1 \
 	-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib \
 	-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
 	-I$(top_srcdir)/lib -I$(top_builddir)/lib
-- 
2.20.1




More information about the Libguestfs mailing list