1. 12 Dec, 2018 6 commits
    • Bastien Nocera's avatar
      uru4000: Fix unused value in sm_read_regs() · 25d0fa42
      Bastien Nocera authored
      We don't need to assign urudev if we only want the size of one of its
      members.
      
      libfprint/drivers/uru4000.c:554:20: warning: Value stored to 'urudev' during its initialization is never read
              struct uru4k_dev *urudev = FP_INSTANCE_DATA(FP_DEV(dev));
                                ^~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      25d0fa42
    • Bastien Nocera's avatar
      lib: Fix baroque code in fp_discover_prints() · 52208a66
      Bastien Nocera authored
      Use GPtrArray to simplify the implementation.
      
      libfprint/fpi-data.c:777:13: warning: Access to field 'data' results in a dereference of a null pointer (loaded from variable 'elem')
                      list[i] = elem->data;
                                ^~~~~~~~~~
      52208a66
    • Bastien Nocera's avatar
      lib: Fix uninitialised value in fp_print_data_load() · 6725b22f
      Bastien Nocera authored
      libfprint/fpi-data.c:497:7: warning: 2nd function call argument is an uninitialized value
              if (!fp_dev_supports_print_data(dev, fdata)) {
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      6725b22f
    • Bastien Nocera's avatar
      lib: Fix memory leak on error in fp_print_data_save() · 21bac430
      Bastien Nocera authored
      libfprint/fpi-data.c:393:3: warning: Potential leak of memory pointed to by 'buf'
                      fp_err("couldn't create storage directory");
                      ^~~~~~
      libfprint/fpi-log.h:75:16: note: expanded from macro 'fp_err'
       #define fp_err g_warning
                     ^~~~~~~~~
      21bac430
    • Bastien Nocera's avatar
      lib: Fix unintialised variable warning in fp_get_next_timeout() · 0ddd11f8
      Bastien Nocera authored
      libfprint/fpi-poll.c:398:11: warning: The left operand of '==' is a garbage value
              else if (timercmp(&fprint_timeout, &libusb_timeout, <))
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /usr/include/sys/time.h:162:17: note: expanded from macro 'timercmp'
        (((a)->tv_sec == (b)->tv_sec) ?                                             \
          ~~~~~~~~~~~ ^
      0ddd11f8
    • Bastien Nocera's avatar
      lib: Fix possible dereference in fpi_ssm_next_state() · 6d47c443
      Bastien Nocera authored
      libfprint/fpi-ssm.c:244:9: warning: Access to field 'completed' results in a dereference of a null pointer (loaded from variable 'machine')
              BUG_ON(machine->completed);
                     ^~~~~~~~~~~~~~~~~~
      libfprint/fpi-log.h:84:6: note: expanded from macro 'BUG_ON'
              if (condition) {                        \
                  ^~~~~~~~~
      6d47c443
  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 2 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