[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 0/2] Use glib's checks for use of too-new functions
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[Qemu-devel] [PATCH 0/2] Use glib's checks for use of too-new functions |
Date: |
Fri, 29 May 2015 16:01:46 +0100 |
From: "Dr. David Alan Gilbert" <address@hidden>
Glib 2.32 adds a checking mechanism to warn of use of functions that
are available in glib versions newer than a particular version.
This series enables that check (via a -D added during configure);
with it you get warnings like:
/home/dgilbert/git/qemu-world3/vl.c: In function 'main':
/home/dgilbert/git/qemu-world3/vl.c:4385:5: warning: 'g_source_get_ready_time'
is deprecated: Not available before 2.36 [-Wdeprecated-declarations]
printf("Foo! %lld\n", (long long) g_source_get_ready_time(NULL));
Notes:
a) The other patch in the set fixes a configure error that caused a test
never to be run even if there was a new enough glib
b) Peter said he would prefer something #included rather than added as a -D
but then we'd have to change a whole bunch of files to make sure they
do that before glib.h is included, and it wouldn't protect you from new
code that forgot to do that.
c) Glib's older than 2.32 don't have the mechanism and thus don't complain
d) The earliest version marker that glib lets you check against is 2.26,
which is what I've set it to. Since we allow 2.22 but 2.22 doesn't have
this new check, it doesn't cause any warnings.
e) Build and make check'd on fedora 22 (glib 2.44), rhel6 (glib 2.26), and
rhel5 with glib 2.22 built on it.
Dave
Dr. David Alan Gilbert (2):
Fix glib_subprocess test
Compile time checks for newer glib
configure | 7 ++++++-
include/glib-compat.h | 6 ++++++
tests/test-qdev-global-props.c | 2 +-
tests/vhost-user-test.c | 2 ++
4 files changed, 15 insertions(+), 2 deletions(-)
--
2.4.1
- [Qemu-devel] [PATCH 0/2] Use glib's checks for use of too-new functions,
Dr. David Alan Gilbert (git) <=