Fix a brunch of -Wextra warnings:

- 'static' is not at beginning of declaration;
  - unused parameter;
  - comparison between signed and unsigned.
This commit is contained in:
Romain Tartiere 2010-04-07 15:08:04 +00:00
parent 3a0d05d15a
commit 5473befa13
8 changed files with 22 additions and 4 deletions

View file

@ -33,6 +33,7 @@
#endif
#endif
#include <err.h>
#include <stdio.h>
#include <stddef.h>
#include <stdlib.h>
@ -54,6 +55,10 @@ int main(int argc, const char* argv[])
nfc_target_info_t nti;
nfc_device_desc_t *pnddDevices;
if (argc > 1) {
errx (1, "usage: %s", argv[0]);
}
// Display libnfc version
const char* acLibnfcVersion = nfc_version();
printf("%s use libnfc %s\n", argv[0], acLibnfcVersion);

View file

@ -47,7 +47,7 @@ static mifare_tag mtKeys;
static mifare_tag mtDump;
static bool bUseKeyA;
static bool bUseKeyFile;
static uint32_t uiBlocks;
static uint8_t uiBlocks;
static byte_t keys[] = {
0xff,0xff,0xff,0xff,0xff,0xff,
0xd3,0xf7,0xd3,0xf7,0xd3,0xf7,

View file

@ -26,6 +26,7 @@
#include "config.h"
#endif // HAVE_CONFIG_H
#include <err.h>
#include <stdio.h>
#include <string.h>
#include <nfc/nfc.h>
@ -40,6 +41,10 @@ int main(int argc, const char *argv[])
size_t szRecvBits;
byte_t send[] = "Hello World!";
if (argc > 1) {
errx (1, "usage: %s", argv[0]);
}
pnd = nfc_connect(NULL);
if (!pnd || !nfc_initiator_init(pnd)
|| !nfc_initiator_select_dep_target(pnd, NM_PASSIVE_DEP, NULL, 0,

View file

@ -27,6 +27,7 @@
#include "config.h"
#endif // HAVE_CONFIG_H
#include <err.h>
#include <stdio.h>
#include <nfc/nfc.h>
@ -39,6 +40,10 @@ int main(int argc, const char *argv[])
byte_t send[] = "Hello Mars!";
nfc_device_t *pnd = nfc_connect(NULL);
if (argc > 1) {
errx (1, "usage: %s", argv[0]);
}
if (!pnd || !nfc_target_init(pnd, abtRecv, &szRecvBits)) {
printf("unable to connect or initialize\n");
return 1;