From: Mike Frysinger Date: Sat, 14 Jun 2014 02:44:40 +0000 (-0400) Subject: asix-sigma: fix build time warnings X-Git-Tag: libsigrok-0.4.0~1286 X-Git-Url: https://sigrok.org/gitweb/?a=commitdiff_plain;h=e15e5873b34f1a06ea2490ad7782870daa63f311;p=libsigrok.git asix-sigma: fix build time warnings We need to include unistd.h for usleep(): hardware/asix-sigma/asix-sigma.c: In function 'sigma_fpga_init_bitbang': hardware/asix-sigma/asix-sigma.c:450:3: warning: implicit declaration of function 'usleep' usleep(10000); And we need to tweak the type of chunks_per_read to match dl_lines_total: hardware/asix-sigma/asix-sigma.c: In function 'download_capture': hardware/asix-sigma/asix-sigma.c:1161:39: warning: comparison between signed and unsigned integer expressions dl_lines_curr = MIN(chunks_per_read, dl_lines_total); --- diff --git a/hardware/asix-sigma/asix-sigma.c b/hardware/asix-sigma/asix-sigma.c index 26792a41..747d5f0c 100644 --- a/hardware/asix-sigma/asix-sigma.c +++ b/hardware/asix-sigma/asix-sigma.c @@ -27,6 +27,7 @@ #include #include #include +#include #include "libsigrok.h" #include "libsigrok-internal.h" #include "asix-sigma.h" @@ -1113,7 +1114,7 @@ static int decode_chunk_ts(struct sigma_dram_line *dram_line, static int download_capture(struct sr_dev_inst *sdi) { struct dev_context *devc = sdi->priv; - const int chunks_per_read = 32; + const uint32_t chunks_per_read = 32; struct sigma_dram_line *dram_line; int bufsz; uint32_t stoppos, triggerpos;