[tracker-miners/wip/carlosg/compile-warnings: 2/9] tracker-extract: Set min glib version where we use libgsf
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/wip/carlosg/compile-warnings: 2/9] tracker-extract: Set min glib version where we use libgsf
- Date: Mon, 17 Feb 2020 00:35:58 +0000 (UTC)
commit bfb988460de633eea5f809fa17e7dadabb15d571
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Feb 17 01:19:37 2020 +0100
tracker-extract: Set min glib version where we use libgsf
Libgsf has API that uses GParameter, a struct marked as deprecated
in glib 2.54. As it seems unlikely it'll shed that API any soon,
make it sure complation doesn't trigger deprecation warnings we
don't fall in ourselves.
We define it in tracker-gsf and tracker-extract-msoffice itself,
constrained to C files so we ensure the define doesn't propagate
unintendedly.
src/tracker-extract/tracker-extract-msoffice.c | 2 ++
src/tracker-extract/tracker-gsf.c | 2 ++
2 files changed, 4 insertions(+)
---
diff --git a/src/tracker-extract/tracker-extract-msoffice.c b/src/tracker-extract/tracker-extract-msoffice.c
index ada35a1cd..d62a404b3 100644
--- a/src/tracker-extract/tracker-extract-msoffice.c
+++ b/src/tracker-extract/tracker-extract-msoffice.c
@@ -24,6 +24,8 @@
#include <errno.h>
#include <string.h>
+/* Avoid warnings about deprecated GParameter from gsf headers */
+#define GLIB_VERSION_MIN_REQUIRED GLIB_VERSION_2_40
#include <glib.h>
#include <gsf/gsf.h>
diff --git a/src/tracker-extract/tracker-gsf.c b/src/tracker-extract/tracker-gsf.c
index ebe2735be..563c43401 100644
--- a/src/tracker-extract/tracker-gsf.c
+++ b/src/tracker-extract/tracker-gsf.c
@@ -20,6 +20,8 @@
#include <errno.h>
#include <string.h>
+/* Avoid warnings about deprecated GParameter from gsf headers */
+#define GLIB_VERSION_MIN_REQUIRED GLIB_VERSION_2_40
#include <glib.h>
#include <libtracker-miners-common/tracker-file-utils.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]