114 lines
3.6 KiB
Diff
114 lines
3.6 KiB
Diff
|
From 228fda84601a9a9f3ba5b39bbea2302f73c2580c Mon Sep 17 00:00:00 2001
|
||
|
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
|
||
|
Date: Wed, 4 Dec 2019 13:12:52 +0100
|
||
|
Subject: [PATCH 073/181] nbis: Add a global include file with all the
|
||
|
definitions ignoring erros
|
||
|
|
||
|
The nbis headers are full of redundant declarations, we can't fix them all
|
||
|
now, so in the mean time let's use an header using pragma to ignore such
|
||
|
errors.
|
||
|
|
||
|
Add the error to nbis private include folder that should be used only by
|
||
|
headers of libfprint-nbis.
|
||
|
---
|
||
|
libfprint/fp-image.c | 2 +-
|
||
|
libfprint/fp-print.c | 3 +--
|
||
|
libfprint/meson.build | 6 +++++
|
||
|
libfprint/nbis/libfprint-include/nbis.h | 35 +++++++++++++++++++++++++
|
||
|
4 files changed, 43 insertions(+), 3 deletions(-)
|
||
|
create mode 100644 libfprint/nbis/libfprint-include/nbis.h
|
||
|
|
||
|
diff --git a/libfprint/fp-image.c b/libfprint/fp-image.c
|
||
|
index 4b8b3cd..c66b010 100644
|
||
|
--- a/libfprint/fp-image.c
|
||
|
+++ b/libfprint/fp-image.c
|
||
|
@@ -20,7 +20,7 @@
|
||
|
|
||
|
#include "fpi-image.h"
|
||
|
|
||
|
-#include "nbis/include/lfs.h"
|
||
|
+#include <nbis.h>
|
||
|
|
||
|
#if HAVE_PIXMAN
|
||
|
#include <pixman.h>
|
||
|
diff --git a/libfprint/fp-print.c b/libfprint/fp-print.c
|
||
|
index e7b119a..ed29ec1 100644
|
||
|
--- a/libfprint/fp-print.c
|
||
|
+++ b/libfprint/fp-print.c
|
||
|
@@ -22,8 +22,7 @@
|
||
|
#include "fpi-image.h"
|
||
|
#include "fpi-device.h"
|
||
|
|
||
|
-#include "nbis/include/bozorth.h"
|
||
|
-#include "nbis/include/lfs.h"
|
||
|
+#include <nbis.h>
|
||
|
|
||
|
/**
|
||
|
* SECTION: fp-print
|
||
|
diff --git a/libfprint/meson.build b/libfprint/meson.build
|
||
|
index 100865d..99ebf73 100644
|
||
|
--- a/libfprint/meson.build
|
||
|
+++ b/libfprint/meson.build
|
||
|
@@ -187,11 +187,17 @@ deps = [ mathlib_dep, glib_dep, gusb_dep, nss_dep, imaging_dep, gio_dep ]
|
||
|
deps += declare_dependency(include_directories: [
|
||
|
root_inc,
|
||
|
include_directories('nbis/include'),
|
||
|
+ include_directories('nbis/libfprint-include'),
|
||
|
])
|
||
|
|
||
|
libnbis = static_library('nbis',
|
||
|
nbis_sources,
|
||
|
dependencies: deps,
|
||
|
+ c_args: cc.get_supported_arguments([
|
||
|
+ '-Wno-error=redundant-decls',
|
||
|
+ '-Wno-redundant-decls',
|
||
|
+ '-Wno-discarded-qualifiers',
|
||
|
+ ]),
|
||
|
install: false)
|
||
|
|
||
|
libfprint = library('fprint',
|
||
|
diff --git a/libfprint/nbis/libfprint-include/nbis.h b/libfprint/nbis/libfprint-include/nbis.h
|
||
|
new file mode 100644
|
||
|
index 0000000..e3f667f
|
||
|
--- /dev/null
|
||
|
+++ b/libfprint/nbis/libfprint-include/nbis.h
|
||
|
@@ -0,0 +1,35 @@
|
||
|
+/*
|
||
|
+ * Example fingerprint device prints listing and deletion
|
||
|
+ * Enrolls your right index finger and saves the print to disk
|
||
|
+ * Copyright (C) 2019 Marco Trevisan <marco.trevisan@canonical.com>
|
||
|
+ *
|
||
|
+ * This library is free software; you can redistribute it and/or
|
||
|
+ * modify it under the terms of the GNU Lesser General Public
|
||
|
+ * License as published by the Free Software Foundation; either
|
||
|
+ * version 2.1 of the License, or (at your option) any later version.
|
||
|
+ *
|
||
|
+ * This library is distributed in the hope that it will be useful,
|
||
|
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
|
+ * Lesser General Public License for more details.
|
||
|
+ *
|
||
|
+ * You should have received a copy of the GNU Lesser General Public
|
||
|
+ * License along with this library; if not, write to the Free Software
|
||
|
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||
|
+ */
|
||
|
+
|
||
|
+#pragma once
|
||
|
+
|
||
|
+#pragma GCC diagnostic push
|
||
|
+#pragma GCC diagnostic ignored "-Wredundant-decls"
|
||
|
+
|
||
|
+#include <bozorth.h>
|
||
|
+#include <bz_array.h>
|
||
|
+#include <defs.h>
|
||
|
+#include <lfs.h>
|
||
|
+#include <log.h>
|
||
|
+#include <morph.h>
|
||
|
+#include <mytime.h>
|
||
|
+#include <sunrast.h>
|
||
|
+
|
||
|
+#pragma GCC diagnostic pop
|
||
|
--
|
||
|
2.24.1
|
||
|
|