]> sigrok.org Git - libsigrok.git/commit
siglent-sds: Fix various compiler warnings.
authorUwe Hermann <redacted>
Sat, 2 May 2020 13:39:26 +0000 (15:39 +0200)
committerUwe Hermann <redacted>
Sat, 2 May 2020 13:48:26 +0000 (15:48 +0200)
commit4c5ac0cf5b3e8a13d6f0ff4255fa21ed6874774a
tree269f08fe5f8bd2b484043b20113ac0394d9b43f7
parent4704f64551dd917c2616b4162e7e816fb57113da
siglent-sds: Fix various compiler warnings.

  src/hardware/siglent-sds/protocol.c: In function 'siglent_sds_get_digital':
  src/hardware/siglent-sds/protocol.c:382:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
          if (data_low_channels->len <= samples_index) {
                                     ^
  src/hardware/siglent-sds/protocol.c:391:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
          if (data_high_channels->len <= samples_index) {
                                      ^
  src/hardware/siglent-sds/protocol.c:417:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (long index = 0; index < tmp_samplebuf->len; index++) {
                                  ^
  In file included from src/hardware/siglent-sds/protocol.c:37:0:
  src/hardware/siglent-sds/protocol.c: In function 'siglent_sds_receive':
  src/hardware/siglent-sds/protocol.h:28:20: warning: format '%li' expects argument of type 'long int', but argument 3 has type 'uint64_t {aka long long unsigned int}' [-Wformat=]
   #define LOG_PREFIX "siglent-sds"
                      ^
  ./src/libsigrok-internal.h:815:41: note: in expansion of macro 'LOG_PREFIX'
   #define sr_dbg(...) sr_log(SR_LOG_DBG,  LOG_PREFIX ": " __VA_ARGS__)
                                           ^
  src/hardware/siglent-sds/protocol.c:564:6: note: in expansion of macro 'sr_dbg'
        sr_dbg("Requesting: %li bytes.", devc->num_samples - devc->num_block_bytes);
        ^
  src/hardware/siglent-sds/protocol.c: In function 'siglent_sds_get_dev_cfg_horizontal':
  src/hardware/siglent-sds/protocol.h:28:20: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'uint64_t {aka long long unsigned int}' [-Wformat=]
   #define LOG_PREFIX "siglent-sds"
                      ^
  ./src/libsigrok-internal.h:815:41: note: in expansion of macro 'LOG_PREFIX'
   #define sr_dbg(...) sr_log(SR_LOG_DBG,  LOG_PREFIX ": " __VA_ARGS__)
                                           ^
  src/hardware/siglent-sds/protocol.c:933:2: note: in expansion of macro 'sr_dbg'
    sr_dbg("Current memory depth: %lu.", devc->memory_depth_analog);
    ^
src/hardware/siglent-sds/protocol.c