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.
This commit is contained in:
Marco Trevisan (Treviño) 2019-12-04 13:12:52 +01:00
parent e1d181887f
commit 6a090656b6
4 changed files with 43 additions and 3 deletions

View file

@ -20,7 +20,7 @@
#include "fpi-image.h"
#include "nbis/include/lfs.h"
#include <nbis.h>
#if HAVE_PIXMAN
#include <pixman.h>

View file

@ -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

View file

@ -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',

View file

@ -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