1. 09 Dec, 2018 1 commit
    • Bastien Nocera's avatar
      lib: Generate driver IDs, instead of hard-coding them · 7a94aa92
      Bastien Nocera authored
      Instead of adding driver IDs by hand to a header file, generate the
      driver ID from the (hopefully unique) name of the driver.
      
      This means one file less for driver authors to modify, and one possible
      source of merge conflicts less as well.
      
      However, this means that already enrolled fingerprints will need to be
      enrolled again, as the driver IDs will have changed compared to their
      old on-disk value.
      7a94aa92
  2. 06 Dec, 2018 1 commit
  3. 04 Dec, 2018 2 commits
  4. 03 Dec, 2018 2 commits
  5. 30 Nov, 2018 2 commits
  6. 29 Nov, 2018 12 commits
  7. 25 Nov, 2018 9 commits
  8. 23 Nov, 2018 3 commits
  9. 20 Nov, 2018 1 commit
  10. 13 Nov, 2018 5 commits
    • Bastien Nocera's avatar
      lib: Fix get_next_timeout_expiry · 11b11a9d
      Bastien Nocera authored
      If get_next_timeout_expiry() fails, and libusb_get_next_timeout()
      has no timeouts or failed, fprint_timeout will not be set, and
      we cannot compare it to libusb_timeout.
      
      Exit early if both failed or have empty queues.
      11b11a9d
    • Bastien Nocera's avatar
      elan: Fix format mismatch warnings in debug output · 9da69dfc
      Bastien Nocera authored
      libfprint/drivers/elan.c:351:12: warning: format specifies type 'unsigned short' but the argument has type 'unsigned char' [-Wformat]
                              dbg_buf(elandev->last_read, transfer->actual_length);
                              ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      libfprint/drivers/elan.c:46:21: note: expanded from macro 'dbg_buf'
          fp_dbg("%02hx", buf[0]);                                  \
          ~~~~~~~~~~~~~~~~^~~~~~~
      include/glib-2.0/glib/gmessages.h:345:32: note: expanded from macro 'g_debug'
                                     __VA_ARGS__)
                                     ^~~~~~~~~~~
      libfprint/drivers/elan.c:351:12: warning: format specifies type 'unsigned short' but the argument has type 'int' [-Wformat]
                              dbg_buf(elandev->last_read, transfer->actual_length);
                              ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      libfprint/drivers/elan.c:48:21: note: expanded from macro 'dbg_buf'
          fp_dbg("%04hx", buf[0] << 8 | buf[1]);                    \
          ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
      include/glib-2.0/glib/gmessages.h:345:32: note: expanded from macro 'g_debug'
                                     __VA_ARGS__)
                                     ^~~~~~~~~~~
      libfprint/drivers/elan.c:351:12: warning: format specifies type 'unsigned short' but the argument has type 'int' [-Wformat]
                              dbg_buf(elandev->last_read, transfer->actual_length);
                              ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      libfprint/drivers/elan.c:50:35: note: expanded from macro 'dbg_buf'
          fp_dbg("%04hx... (%d bytes)", buf[0] << 8 | buf[1], len)
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
      include/glib-2.0/glib/gmessages.h:345:32: note: expanded from macro 'g_debug'
                                     __VA_ARGS__)
                                     ^~~~~~~~~~~
      libfprint/drivers/elan.c:413:10: warning: format specifies type 'unsigned short' but the argument has type 'unsigned char' [-Wformat]
              dbg_buf(cmd->cmd, 2);
              ~~~~~~~~^~~~~~~~~~~~
      libfprint/drivers/elan.c:46:21: note: expanded from macro 'dbg_buf'
          fp_dbg("%02hx", buf[0]);                                  \
          ~~~~~~~~~~~~~~~~^~~~~~~
      include/glib-2.0/glib/gmessages.h:345:32: note: expanded from macro 'g_debug'
                                     __VA_ARGS__)
                                     ^~~~~~~~~~~
      libfprint/drivers/elan.c:413:10: warning: format specifies type 'unsigned short' but the argument has type 'int' [-Wformat]
              dbg_buf(cmd->cmd, 2);
              ~~~~~~~~^~~~~~~~~~~~
      libfprint/drivers/elan.c:48:21: note: expanded from macro 'dbg_buf'
          fp_dbg("%04hx", buf[0] << 8 | buf[1]);                    \
          ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
      include/glib-2.0/glib/gmessages.h:345:32: note: expanded from macro 'g_debug'
                                     __VA_ARGS__)
                                     ^~~~~~~~~~~
      libfprint/drivers/elan.c:413:10: warning: format specifies type 'unsigned short' but the argument has type 'int' [-Wformat]
              dbg_buf(cmd->cmd, 2);
              ~~~~~~~~^~~~~~~~~~~~
      libfprint/drivers/elan.c:50:35: note: expanded from macro 'dbg_buf'
          fp_dbg("%04hx... (%d bytes)", buf[0] << 8 | buf[1], len)
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
      include/glib-2.0/glib/gmessages.h:345:32: note: expanded from macro 'g_debug'
                                     __VA_ARGS__)
                                     ^~~~~~~~~~~
      9da69dfc
    • Bastien Nocera's avatar
      vfs101: Fix warning about value truncation · e5f4021a
      Bastien Nocera authored
      libfprint/drivers/vfs101.c:854:6: warning: absolute value function 'abs' given an argument of type 'long' but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value]
              if (abs(count - VFS_IMG_BEST_CONTRAST) < abs(vdev->best_clevel - VFS_IMG_BEST_CONTRAST))
                  ^
      libfprint/drivers/vfs101.c:854:6: note: use function 'labs' instead
              if (abs(count - VFS_IMG_BEST_CONTRAST) < abs(vdev->best_clevel - VFS_IMG_BEST_CONTRAST))
                  ^~~
                  labs
      e5f4021a
    • Bastien Nocera's avatar
      vfs101: Fix typo in "VFS_IMG_BEST_CONRAST" constant · 4dcbc6a3
      Bastien Nocera authored
      It's contrast, says so above the definition.
      4dcbc6a3
    • Bastien Nocera's avatar
      lib: Fix uninitialised variable in fpi_imgdev_image_captured() · 7a72d8fd
      Bastien Nocera authored
      libfprint/fpi-dev-img.c:255:6: warning: variable 'print' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
              if (imgdev->action != IMG_ACTION_CAPTURE) {
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      libfprint/fpi-dev-img.c:271:25: note: uninitialized use occurs here
              imgdev->acquire_data = print;
                                     ^~~~~
      libfprint/fpi-dev-img.c:255:2: note: remove the 'if' if its condition is always true
              if (imgdev->action != IMG_ACTION_CAPTURE) {
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      libfprint/fpi-dev-img.c:232:29: note: initialize the variable 'print' to silence this warning
              struct fp_print_data *print;
                                         ^
                                          = NULL
      7a72d8fd
  11. 12 Nov, 2018 1 commit
  12. 09 Nov, 2018 1 commit