Commit graph

1450 commits

Author SHA1 Message Date
Ludovic Rousseau
551512ad54 Do not cast pointers to different size integers
It will work only on little endian machines.

Fix clang warning
pn53x-tamashell.c:163:40: warning: cast from 'uint8_t *' (aka 'unsigned char *')
      to 'unsigned int *' increases required alignment from 1 to 4
      [-Wcast-align]
      size = sscanf(cmd+offset, "%2x", (unsigned int*)&byte);
                                       ^~~~~~~~~~~~~~~~~~~~
2012-05-17 07:16:02 +00:00
Romuald Conty
cfd95bae2c Fix shadowed declaration warnings 2012-05-17 01:18:24 +00:00
Romuald Conty
e4802de965 Add new public functions to grab information in string format:
- New nfc_device_get_information_about()
 - Moved nfc-utils function str_nfc_baud_rate()
 - New str_nfc_modulation_type()
 - Add new device_get_information_about callback to nfc_driver struct
 - Export new symbols
 - Changed internal pn53x firmware text handling: we now store firmware text for further operations
 - print_nfc_target() now uses str_nfc_* functions
 - nfc-probe util now have a verbose which display information on detected devices (Fix verbose set but not used warning ;-) )
2012-05-17 00:48:47 +00:00
Romuald Conty
6710ca943e Fix ACR122S device detection when no ACR122S device available (endless UART receive) 2012-05-17 00:38:54 +00:00
Romuald Conty
fb50e3b235 Display right driver name while detecting PCSC 2012-05-17 00:37:00 +00:00
Ludovic Rousseau
d98b5d00ab Fix the fix in revision r1322
clang warning:
arygon.c:115:118: warning: data argument not used by format string
      [-Wformat-extra-args]
  ..."%s", "Trying to find ARYGON device on serial port: %s at %d bauds.", acPort,...
     ~~~~                                                                  ^
1 warning generated.
2012-05-16 19:13:16 +00:00
Ludovic Rousseau
cf56496ee9 Fix compiler warning
pn53x-sam.c:120: warning: enumeration value ‘PSM_NORMAL’ not handled in
switch
2012-05-16 19:06:42 +00:00
Romuald Conty
45ef3b43c4 Fix unused result warnings and add a new NFC_ESOFT error. 2012-05-16 18:24:16 +00:00
Romuald Conty
bfcdb1bd4c Fix more warnings while using -Wswitch-enum and -Wshadow on internal libnfc files 2012-05-16 18:08:42 +00:00
Romuald Conty
d6a1249469 current debian package can compile all drivers except acr122_pcsc (PCSC dependencies have already been removed from package) 2012-05-16 18:06:27 +00:00
Romuald Conty
9ea7a9ea27 delete unused log4crc file 2012-05-16 18:02:51 +00:00
Romuald Conty
05acb85372 Use explicit case instead of default in switch()
- Fix warnings while using -Wswitch-enum
 - Fix two minor bugs due to a bad case handle
2012-05-16 17:51:34 +00:00
Romuald Conty
10f24d97aa Any successfull PowerDown command have to change local power mode state 2012-05-16 16:48:06 +00:00
Ludovic Rousseau
782b72e29f Correctly handle PCSC header files on Mac OS X
Fixes Issue #195
2012-05-16 13:34:21 +00:00
Ludovic Rousseau
3737481262 Correctly use the log_put() format
Fix compiler warning:
warning: format not a string literal and no format arguments
2012-05-16 13:17:52 +00:00
Ludovic Rousseau
eb1e6d0cb4 Check log_put() printf-like format
Thanks to Romain Tartière for the patch
http://groups.google.com/group/libnfc-devel/browse_thread/thread/da352d67e6965851
2012-05-16 13:15:34 +00:00
Ludovic Rousseau
d28889c696 Remove now useless #define for getline()
getline() is no more used. So no need to use this ugly hack.

This also solves a compiler warning;
In file included from ../libnfc/log.h:22:0,
                 from ../libnfc/chips/pn53x-internal.h:28,
                 from ../libnfc/chips/pn53x.h:31,
                 from pn53x-tamashell.c:68:
../config.h:153:0: warning: "_XOPEN_SOURCE" redefined [enabled by default]
/usr/include/features.h:165:0: note: this is the location of the previous definition
2012-05-15 07:57:37 +00:00
Romuald Conty
7b82a98b72 Improve acr122_usb frame building and add links to documentations 2012-05-15 07:27:28 +00:00
Philippe Teuwen
028db71d79 utils/nfc-emulate-forum-tag4: add support for v2.0 of the spec 2012-05-14 22:13:19 +00:00
Romuald Conty
a56e5f9cd7 Fix nfc-emulation, now works with utils/nfc-emulate-forum-tag4 and Nexus S 2012-05-14 21:20:26 +00:00
Romuald Conty
9383fa66bf Fix emulation based on nfc-emulation.c 2012-05-14 20:47:41 +00:00
Romuald Conty
769fc63bb0 Fix acr122_pcsc driver name. 2012-05-14 20:40:19 +00:00
Philippe Teuwen
7597055f26 fix typos 2012-05-14 19:44:03 +00:00
Romain Tartiere
e9b2f5729c Fix a bunch of warnings. 2012-05-14 13:47:31 +00:00
Romain Tartiere
2256d5d3dc Fix usage of possibly uninitialized 'result'.
Can't tell how gcc/clang fail to detect this…
2012-05-14 12:50:04 +00:00
Ludovic Rousseau
dfcabf71f0 Fix compiler warning
uart_posix.c:55:1: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
2012-05-14 09:23:18 +00:00
Ludovic Rousseau
1ac1196af6 MIN/MAX are already defined in nfc-utils.h and nfc-internal.h 2012-05-13 19:16:52 +00:00
Ludovic Rousseau
59d47bc7da Add MIN/MAX declarations in nfc-internal.h and nfc-utils.h
Remove the now useless #include <sys/param.h>
2012-05-13 19:15:44 +00:00
Ludovic Rousseau
a14ec0cbaa Fix compiler warnings:
In file included from nfc-internal.c:26:
nfc-internal.h:111:5: warning: "_BYTE_ORDER" is not defined
nfc-internal.h:111:20: warning: "_LITTLE_ENDIAN" is not defined
2012-05-13 15:11:28 +00:00
Ludovic Rousseau
b9e5e96e49 Use "const char *" instead of "char *" for the strings passed to
log_put()

It does not solve any bug but will allow to detect some by the compiler
2012-05-13 14:58:44 +00:00
Ludovic Rousseau
3e678822ce Fix compiler warnings
pn532_uart.c:151: warning: no previous prototype for ‘pn532_connstring_decode’
pn532_uart.c:491: warning: no previous prototype for ‘pn532_uart_abort_command’
2012-05-13 14:51:18 +00:00
Ludovic Rousseau
56f3baf7a9 Fix compiler warnings
pn53x_usb.c:94: warning: no previous prototype for ‘pn53x_usb_bulk_read’
pn53x_usb.c:107: warning: no previous prototype for ‘pn53x_usb_bulk_write’
pn53x_usb.c:139: warning: no previous prototype for ‘pn53x_usb_get_device_model’
pn53x_usb.c:154: warning: no previous prototype for ‘pn53x_usb_get_end_points’
pn53x_usb.c:259: warning: no previous prototype for ‘pn53x_usb_connstring_decode’
pn53x_usb.c:713: warning: no previous prototype for ‘pn53x_usb_set_property_bool’
pn53x_usb.c:742: warning: no previous prototype for ‘pn53x_usb_abort_command’
2012-05-13 14:50:18 +00:00
Ludovic Rousseau
324776353a Fix compiler warnings
arygon.c:174: warning: no previous prototype for ‘arygon_connstring_decode’
arygon.c:360: warning: no previous prototype for ‘arygon_abort’
arygon.c:545: warning: no previous prototype for ‘arygon_abort_command’
2012-05-13 14:48:08 +00:00
Ludovic Rousseau
55322ad802 Fix compiler warnings
acr122s.c:422: warning: no previous prototype for ‘acr122s_connstring_decode’
acr122s.c:703: warning: no previous prototype for ‘acr122s_abort_command’
2012-05-13 14:47:10 +00:00
Ludovic Rousseau
054dc9b7ca Declare internal functions as static
Fixes compiler warnings:
acr122_usb.c:90: warning: no previous prototype for ‘acr122_usb_bulk_read’
acr122_usb.c:107: warning: no previous prototype for ‘acr122_usb_bulk_write’
acr122_usb.c:140: warning: no previous prototype for ‘acr122_usb_get_device_model’
acr122_usb.c:155: warning: no previous prototype for ‘acr122_usb_get_end_points’
acr122_usb.c:252: warning: no previous prototype for ‘acr122_usb_connstring_decode’
acr122_usb.c:306: warning: no previous prototype for ‘acr122_usb_open’
acr122_usb.c:428: warning: no previous prototype for ‘acr122_usb_close’
acr122_usb.c:497: warning: no previous prototype for ‘acr122_build_frame’
acr122_usb.c:660: warning: no previous prototype for ‘acr122_usb_abort_command’
2012-05-13 14:23:44 +00:00
Ludovic Rousseau
a2b022609f Fix some spelling mistakes
Closes Issue #196
2012-05-13 13:10:15 +00:00
Ludovic Rousseau
02cf0b3d60 Fix compiler warning
nfc-list.c:64: warning: no previous prototype for ‘print_usage’
2012-05-13 13:03:47 +00:00
Ludovic Rousseau
55ef86da33 Add a missing #include and fix a compiler warning
iso14443-subr.c:99: warning: no previous prototype for ‘iso14443_cascade_uid’
2012-05-13 13:02:37 +00:00
Ludovic Rousseau
2677dfb161 Add a missing #include and fix a compiler warning
nfc-internal.c:29: warning: no previous prototype for ‘prepare_initiator_data’
2012-05-13 13:01:06 +00:00
Ludovic Rousseau
e80d545b38 Fix compiler warning
mirror-subr.c:64: warning: no previous prototype for ‘mirror_bytes’
2012-05-13 12:58:44 +00:00
Ludovic Rousseau
2e075df1a9 Fix compiler warnings
nfc-emulate-forum-tag4.c:117: warning: no previous prototype for ‘nfcforum_tag4_io’
nfc-emulate-forum-tag4.c:231: warning: no previous prototype for ‘stop_emulation’
nfc-emulate-forum-tag4.c:241: warning: no previous prototype for ‘ndef_message_load’
nfc-emulate-forum-tag4.c:269: warning: no previous prototype for ‘ndef_message_save’
nfc-emulate-forum-tag4.c:285: warning: no previous prototype for ‘usage’
2012-05-13 12:57:49 +00:00
Ludovic Rousseau
7f9ba48018 Fix compiler warnings
nfc-read-forum-tag3.c:63: warning: no previous prototype for ‘print_usage’
nfc-read-forum-tag3.c:70: warning: no previous prototype for ‘stop_select’
nfc-read-forum-tag3.c:80: warning: no previous prototype for ‘build_felica_frame’
nfc-read-forum-tag3.c:91: warning: no previous prototype for ‘nfc_forum_tag_type3_check’
2012-05-13 12:56:41 +00:00
Ludovic Rousseau
0926f8a7c9 Fix compiler warning
nfc-probe.c:64: warning: no previous prototype for ‘print_usage’
2012-05-13 12:55:26 +00:00
Ludovic Rousseau
b5c1f2d619 Fix compiler warning
nfc-dep-initiator.c:54: warning: no previous prototype for ‘stop_dep_communication’
2012-05-13 12:54:37 +00:00
Ludovic Rousseau
b5e688e74a Fix compiler warnings:
nfc-relay-picc.c:76: warning: no previous prototype for ‘intr_hdlr’
nfc-relay-picc.c:85: warning: no previous prototype for ‘print_usage’
nfc-relay-picc.c:96: warning: no previous prototype for ‘print_hex_fd4’
nfc-relay-picc.c:118: warning: no previous prototype for ‘scan_hex_fd3’
nfc-relay-picc.c: In function ‘main’:
nfc-relay-picc.c:190: warning: function declaration isn’t a prototype
2012-05-13 12:53:34 +00:00
Ludovic Rousseau
6abb1c4eab Fix compiler warning
nfc-dep-target.c:53: warning: no previous prototype for ‘stop_dep_communication’
2012-05-13 12:51:57 +00:00
Ludovic Rousseau
edefdf0157 Fix compiler warnings
nfc-emulate-forum-tag2.c:78: warning: no previous prototype for ‘stop_emulation’
nfc-emulate-forum-tag2.c:116: warning: no previous prototype for ‘nfcforum_tag2_io’
2012-05-13 12:50:30 +00:00
Ludovic Rousseau
72ad8f7ad5 Remove an explicit cast and fix a compiler warning
nfc-emulate-uid.c:125: warning: function declaration isn’t a prototype
2012-05-13 12:49:28 +00:00
Ludovic Rousseau
714997fc34 Fix compiler warnings
nfc-emulate-uid.c:70: warning: no previous prototype for ‘intr_hdlr’
nfc-emulate-uid.c:79: warning: no previous prototype for ‘print_usage’
2012-05-13 12:48:28 +00:00
Ludovic Rousseau
96b1643522 Remove an explicit cast and fix a compiler warning
nfc-emulate-tag.c:180: warning: function declaration isn’t a prototype
2012-05-13 12:46:33 +00:00