Blob Blame History Raw
From 34b61d11546e764b08bc97276b102560fb899959 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
Date: Tue, 3 Dec 2019 19:36:26 +0100
Subject: [PATCH 067/181] drivers, examples: Don't use -Wno-pointer-sign and
 fix relative errors

---
 examples/storage.c                      | 2 +-
 libfprint/drivers/synaptics/synaptics.c | 4 ++--
 libfprint/drivers/upekts.c              | 2 +-
 libfprint/drivers/vfs0050.c             | 2 +-
 meson.build                             | 1 -
 5 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/examples/storage.c b/examples/storage.c
index 932163e..db35854 100644
--- a/examples/storage.c
+++ b/examples/storage.c
@@ -57,7 +57,7 @@ load_data (void)
   GVariantDict *res;
   GVariant *var;
   g_autofree gchar *contents = NULL;
-  gssize length = 0;
+  gsize length = 0;
 
   if (!g_file_get_contents (STORAGE_FILE, &contents, &length, NULL))
     {
diff --git a/libfprint/drivers/synaptics/synaptics.c b/libfprint/drivers/synaptics/synaptics.c
index 1524c45..247b658 100644
--- a/libfprint/drivers/synaptics/synaptics.c
+++ b/libfprint/drivers/synaptics/synaptics.c
@@ -407,7 +407,7 @@ static gboolean
 parse_print_data (GVariant      *data,
                   guint8        *finger,
                   const guint8 **user_id,
-                  gssize        *user_id_len)
+                  gsize         *user_id_len)
 {
   g_autoptr(GVariant) user_id_var = NULL;
 
@@ -506,7 +506,7 @@ list_msg_cb (FpiDeviceSynaptics *self,
                    get_enroll_templates_resp->templates[n].user_id,
                    get_enroll_templates_resp->templates[n].finger_id);
 
-          userid = get_enroll_templates_resp->templates[n].user_id;
+          userid = (gchar *) get_enroll_templates_resp->templates[n].user_id;
 
           print = fp_print_new (FP_DEVICE (self));
           uid = g_variant_new_fixed_array (G_VARIANT_TYPE_BYTE,
diff --git a/libfprint/drivers/upekts.c b/libfprint/drivers/upekts.c
index 05cd9c5..6ce8136 100644
--- a/libfprint/drivers/upekts.c
+++ b/libfprint/drivers/upekts.c
@@ -375,7 +375,7 @@ read_msg_cb (FpiUsbTransfer *transfer, FpDevice *device,
       goto err;
     }
 
-  if (strncmp (udata->buffer, "Ciao", 4) != 0)
+  if (strncmp ((char *) udata->buffer, "Ciao", 4) != 0)
     {
       fp_err ("no Ciao for you!!");
       error = fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO,
diff --git a/libfprint/drivers/vfs0050.c b/libfprint/drivers/vfs0050.c
index 9b99dc3..bb6851f 100644
--- a/libfprint/drivers/vfs0050.c
+++ b/libfprint/drivers/vfs0050.c
@@ -399,7 +399,7 @@ interrupt_callback (FpiUsbTransfer *transfer, FpDevice *device,
                     gpointer user_data, GError *error)
 {
   FpDeviceVfs0050 *self = FPI_DEVICE_VFS0050 (device);
-  char *interrupt = transfer->buffer;
+  unsigned char *interrupt = transfer->buffer;
 
   /* we expect a cancellation error when the device is deactivating
    * go into the SSM_CLEAR_EP2 state in that case. */
diff --git a/meson.build b/meson.build
index ef352ba..54761c4 100644
--- a/meson.build
+++ b/meson.build
@@ -31,7 +31,6 @@ common_cflags = cc.get_supported_arguments([
     '-Wunused',
     '-Wstrict-prototypes',
     '-Werror-implicit-function-declaration',
-    '-Wno-pointer-sign',
     '-Wshadow',
     '-DGLIB_VERSION_MIN_REQUIRED=' + glib_version_def,
     '-DGLIB_VERSION_MAX_ALLOWED=' + glib_version_def,
-- 
2.24.1