Add -Wall -Werror and clean up the errors they report

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
diff --git a/Makefile.am b/Makefile.am
index 8285148..8372f19 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,3 +3,5 @@
 fido_SOURCES=fido.c
 
 hidgd_SOURCES=hidgd.c u2f.h u2f_hid.h
+
+AM_CFLAGS=-Wall -Werror
diff --git a/fido.c b/fido.c
index 632e66f..17603e5 100644
--- a/fido.c
+++ b/fido.c
@@ -34,11 +34,11 @@
 };
 
 int
-main(int argc, void *argv[])
+main(int argc, char *argv[])
 {
 	int fd;
 
-	printf("size is %d\n", sizeof(report_desc));
+	printf("size is %ld\n", sizeof(report_desc));
 	if (argc != 2)
 		exit(0);
 	printf("writing file\n");
diff --git a/hidgd.c b/hidgd.c
index 0463d61..94e5a11 100644
--- a/hidgd.c
+++ b/hidgd.c
@@ -47,7 +47,7 @@
 	int count;
 
 	if (MSG_LEN(*frame) != sizeof(U2FHID_INIT_REQ)) {
-		fprintf(stderr, "INIT message wrong length %d != %d\n",
+		fprintf(stderr, "INIT message wrong length %d != %ld\n",
 			MSG_LEN(*frame),
 			sizeof(U2FHID_INIT_REQ));
 		process_error(frame, ERR_INVALID_LEN);
@@ -63,7 +63,7 @@
 	reply->init.cmd = U2FHID_INIT;
 	reply->init.bcnth = 0;
 	reply->init.bcntl = 17;
-	printf("setting reply size to %d\n", sizeof(*resp));
+	printf("setting reply size to %ld\n", sizeof(*resp));
 	memcpy(resp->nonce, req->nonce, sizeof(req->nonce));
 	resp->cid = 1;
 	resp->versionInterface = U2FHID_IF_VERSION;