From 34acb80a28d1b48e734883a32f7f3344dc216ec0 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 17 May 2011 15:04:56 +0100 Subject: [PATCH] Enable deprecation warnings on all C programs. --- cat/Makefile.am | 3 +++ df/Makefile.am | 1 + edit/Makefile.am | 1 + examples/Makefile.am | 3 +++ fish/Makefile.am | 1 + fuse/Makefile.am | 1 + generator/generator_fish.ml | 3 +++ inspector/Makefile.am | 1 + rescue/Makefile.am | 1 + src/Makefile.am | 1 + test-tool/Makefile.am | 1 + 11 files changed, 17 insertions(+) diff --git a/cat/Makefile.am b/cat/Makefile.am index a049a61..bf1d57c 100644 --- a/cat/Makefile.am +++ b/cat/Makefile.am @@ -42,6 +42,7 @@ virt_cat_SOURCES = \ virt-cat.c virt_cat_CFLAGS = \ + -DGUESTFS_WARN_DEPRECATED=1 \ -I$(top_srcdir)/src -I$(top_builddir)/src \ -I$(top_srcdir)/fish \ -I$(srcdir)/../gnulib/lib -I../gnulib/lib \ @@ -59,6 +60,7 @@ virt_filesystems_SOURCES = \ virt-filesystems.c virt_filesystems_CFLAGS = \ + -DGUESTFS_WARN_DEPRECATED=1 \ -I$(top_srcdir)/src -I$(top_builddir)/src \ -I$(top_srcdir)/fish \ -I$(srcdir)/../gnulib/lib -I../gnulib/lib \ @@ -76,6 +78,7 @@ virt_ls_SOURCES = \ virt-ls.c virt_ls_CFLAGS = \ + -DGUESTFS_WARN_DEPRECATED=1 \ -I$(top_srcdir)/src -I$(top_builddir)/src \ -I$(top_srcdir)/fish \ -I$(srcdir)/../gnulib/lib -I../gnulib/lib \ diff --git a/df/Makefile.am b/df/Makefile.am index 69c6140..1711798 100644 --- a/df/Makefile.am +++ b/df/Makefile.am @@ -43,6 +43,7 @@ virt_df_SOURCES = \ output.c virt_df_CFLAGS = \ + -DGUESTFS_WARN_DEPRECATED=1 \ -I$(top_srcdir)/src -I$(top_builddir)/src \ -I$(top_srcdir)/fish \ -I$(srcdir)/../gnulib/lib -I../gnulib/lib \ diff --git a/edit/Makefile.am b/edit/Makefile.am index 5195b51..62b5376 100644 --- a/edit/Makefile.am +++ b/edit/Makefile.am @@ -38,6 +38,7 @@ virt_edit_SOURCES = \ virt-edit.c virt_edit_CFLAGS = \ + -DGUESTFS_WARN_DEPRECATED=1 \ -I$(top_srcdir)/src -I$(top_builddir)/src \ -I$(top_srcdir)/fish \ -I$(srcdir)/../gnulib/lib -I../gnulib/lib \ diff --git a/examples/Makefile.am b/examples/Makefile.am index 00a5267..952d602 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -28,6 +28,7 @@ endif create_disk_SOURCES = create_disk.c create_disk_CFLAGS = \ + -DGUESTFS_WARN_DEPRECATED=1 \ -I$(top_srcdir)/src -I$(top_builddir)/src \ $(WARN_CFLAGS) $(WERROR_CFLAGS) create_disk_LDADD = \ @@ -35,6 +36,7 @@ create_disk_LDADD = \ inspect_vm_SOURCES = inspect_vm.c inspect_vm_CFLAGS = \ + -DGUESTFS_WARN_DEPRECATED=1 \ -I$(top_srcdir)/src -I$(top_builddir)/src \ $(WARN_CFLAGS) $(WERROR_CFLAGS) inspect_vm_LDADD = \ @@ -42,6 +44,7 @@ inspect_vm_LDADD = \ virt_dhcp_address_SOURCES = virt-dhcp-address.c virt_dhcp_address_CFLAGS = \ + -DGUESTFS_WARN_DEPRECATED=1 \ -I$(top_srcdir)/src -I$(top_builddir)/src \ $(WARN_CFLAGS) $(WERROR_CFLAGS) \ $(HIVEX_CFLAGS) diff --git a/fish/Makefile.am b/fish/Makefile.am index 87f937c..69540dd 100644 --- a/fish/Makefile.am +++ b/fish/Makefile.am @@ -115,6 +115,7 @@ cmds_gperf.c: cmds_gperf.gperf mv $@-t $@ guestfish_CFLAGS = \ + -DGUESTFS_WARN_DEPRECATED=1 \ -I$(top_srcdir)/src -I$(top_builddir)/src \ -I$(top_srcdir)/fish -I$(top_builddir)/fish \ -DLOCALEBASEDIR=\""$(datadir)/locale"\" \ diff --git a/fuse/Makefile.am b/fuse/Makefile.am index c860f24..b7558ee 100644 --- a/fuse/Makefile.am +++ b/fuse/Makefile.am @@ -43,6 +43,7 @@ guestmount_SOURCES = \ guestmount.h guestmount_CFLAGS = \ + -DGUESTFS_WARN_DEPRECATED=1 \ -I$(top_srcdir)/src -I$(top_builddir)/src \ -I$(top_srcdir)/fish \ -I$(srcdir)/../gnulib/lib -I../gnulib/lib \ diff --git a/generator/generator_fish.ml b/generator/generator_fish.ml index 532639d..cdf9171 100644 --- a/generator/generator_fish.ml +++ b/generator/generator_fish.ml @@ -48,6 +48,9 @@ let generate_fish_cmds () = pr "#include \n"; pr "\n"; + pr "/* It is safe to call deprecated functions from this file. */\n"; + pr "#undef GUESTFS_WARN_DEPRECATED\n"; + pr "\n"; pr "#include \n"; pr "#include \n"; pr "#include \n"; diff --git a/inspector/Makefile.am b/inspector/Makefile.am index 8024f98..5c48724 100644 --- a/inspector/Makefile.am +++ b/inspector/Makefile.am @@ -59,6 +59,7 @@ virt_inspector_SOURCES = \ virt-inspector.c virt_inspector_CFLAGS = \ + -DGUESTFS_WARN_DEPRECATED=1 \ -I$(top_srcdir)/src -I$(top_builddir)/src \ -I$(top_srcdir)/fish \ -I$(srcdir)/../gnulib/lib -I../gnulib/lib \ diff --git a/rescue/Makefile.am b/rescue/Makefile.am index 0032a23..d3783ae 100644 --- a/rescue/Makefile.am +++ b/rescue/Makefile.am @@ -37,6 +37,7 @@ virt_rescue_SOURCES = \ virt-rescue.c virt_rescue_CFLAGS = \ + -DGUESTFS_WARN_DEPRECATED=1 \ -I$(top_srcdir)/src -I$(top_builddir)/src \ -I$(top_srcdir)/fish \ -I$(srcdir)/../gnulib/lib -I../gnulib/lib \ diff --git a/src/Makefile.am b/src/Makefile.am index 32ac7df..c2e0c6e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -151,6 +151,7 @@ libguestfs_la_LIBADD += liberrnostring.la libprotocol.la libguestfs_la_CFLAGS = \ -DGUESTFS_DEFAULT_PATH='"$(libdir)/guestfs"' \ + -DGUESTFS_WARN_DEPRECATED=1 \ $(HIVEX_CFLAGS) $(AUGEAS_CFLAGS) $(PCRE_CFLAGS) \ $(LIBVIRT_CFLAGS) $(LIBXML2_CFLAGS) \ $(WARN_CFLAGS) $(WERROR_CFLAGS) diff --git a/test-tool/Makefile.am b/test-tool/Makefile.am index 1ed0820..9fa4033 100644 --- a/test-tool/Makefile.am +++ b/test-tool/Makefile.am @@ -26,6 +26,7 @@ man_MANS = libguestfs-test-tool.1 libguestfs_test_tool_SOURCES = test-tool.c libguestfs_test_tool_CFLAGS = \ + -DGUESTFS_WARN_DEPRECATED=1 \ -DLOCALEBASEDIR=\""$(datadir)/locale"\" \ -I$(top_srcdir)/src -I$(top_builddir)/src \ $(WARN_CFLAGS) $(WERROR_CFLAGS) -- 1.8.3.1