diff options
author | laforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede> | 2006-09-30 13:26:32 +0000 |
---|---|---|
committer | laforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede> | 2006-09-30 13:26:32 +0000 |
commit | 7829a04b91731b5bca6f878bf8ee3347559717ff (patch) | |
tree | 61e24305b189a628ac0ab198fd0f5bb137c610dc /src | |
parent | a38aca0474a8c2b5739f3dac1b5028fc19ab7700 (diff) |
fix various compile warnings. code cleanup
git-svn-id: https://svn.gnumonks.org/trunk/librfid@1891 e0336214-984f-0b4b-a45f-81c69e1f0ede
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/cm5121_source.h | 2 | ||||
-rw-r--r-- | src/rfid.c | 1 | ||||
-rw-r--r-- | src/rfid_asic_rc632.c | 8 | ||||
-rw-r--r-- | src/rfid_reader_cm5121.c | 2 |
5 files changed, 11 insertions, 4 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 48cb4a4..04d17d4 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,6 +1,8 @@ LIBVERSION= 0:0:0 INCLUDES = $(all_includes) -I$(top_srcdir)/include -D__LIBRFID__ +AM_CFLAGS = -std=gnu99 + lib_LTLIBRARIES = librfid.la CORE=rfid.c rfid_layer2.c rfid_protocol.c rfid_reader.c diff --git a/src/cm5121_source.h b/src/cm5121_source.h new file mode 100644 index 0000000..8646703 --- /dev/null +++ b/src/cm5121_source.h @@ -0,0 +1,2 @@ + +extern int cm5121_source_init(struct rfid_asic_transport_handle *rath); @@ -15,6 +15,7 @@ #include <stdio.h> #include <string.h> +#include <librfid/rfid_reader.h> #include <librfid/rfid_reader_cm5121.h> #include <librfid/rfid_reader_openpcd.h> #include <librfid/rfid_protocol.h> diff --git a/src/rfid_asic_rc632.c b/src/rfid_asic_rc632.c index 39e1273..05ed2cd 100644 --- a/src/rfid_asic_rc632.c +++ b/src/rfid_asic_rc632.c @@ -23,6 +23,7 @@ #include <stdlib.h> #include <string.h> #include <errno.h> +#include <limits.h> #include <sys/types.h> #include <librfid/rfid.h> @@ -171,7 +172,7 @@ static int best_prescaler(u_int64_t timeout, u_int8_t *prescaler, u_int8_t best_prescaler, best_divisor, i; int64_t smallest_diff; - smallest_diff = 0x7fffffffffffffff; + smallest_diff = LLONG_MAX; best_prescaler = 0; for (i = 0; i < 21; i++) { @@ -232,7 +233,7 @@ rc632_timer_set(struct rfid_asic_handle *handle, } /* Wait until RC632 is idle or TIMER IRQ has happened */ -static rc632_wait_idle_timer(struct rfid_asic_handle *handle) +static int rc632_wait_idle_timer(struct rfid_asic_handle *handle) { int ret; u_int8_t irq, cmd; @@ -1002,8 +1003,7 @@ static struct tx_config tx_configs[] = { }; static int rc632_iso14443a_set_speed(struct rfid_asic_handle *handle, - unsigned int tx, - u_int8_t rate) + unsigned int tx, unsigned int rate) { int rc; u_int8_t reg; diff --git a/src/rfid_reader_cm5121.c b/src/rfid_reader_cm5121.c index d61b5f7..ab1e701 100644 --- a/src/rfid_reader_cm5121.c +++ b/src/rfid_reader_cm5121.c @@ -38,6 +38,8 @@ #include <librfid/rfid_asic_rc632.h> #include <librfid/rfid_reader_cm5121.h> +#include "cm5121_source.h" + /* FIXME */ #include "rc632.h" |