From 6a090656b6715e8ee5c47b80fd4d41c51f29067f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Wed, 4 Dec 2019 13:12:52 +0100 Subject: [PATCH] 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 4b8b3cd1..c66b010e 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 #if HAVE_PIXMAN #include diff --git a/libfprint/fp-print.c b/libfprint/fp-print.c index e7b119aa..ed29ec13 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 /** * SECTION: fp-print diff --git a/libfprint/meson.build b/libfprint/meson.build index 100865d1..99ebf736 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 00000000..e3f667f0 --- /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 + * + * 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 +#include +#include +#include +#include +#include +#include +#include + +#pragma GCC diagnostic pop