From 01b3dad1bf88f17c37788624e75465a6f63b95dd Mon Sep 17 00:00:00 2001 From: frankmorgner Date: Tue, 5 Jan 2010 14:04:04 +0000 Subject: [PATCH] Fixed Makefile, removed warning. git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@9 96b47cad-a561-4643-ad3b-153ac7d7599c --- picc_to_pcsc/Makefile | 15 +++++++++++---- picc_to_pcsc/picc_to_pcsc.c | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/picc_to_pcsc/Makefile b/picc_to_pcsc/Makefile index 1a4da6c..571b61a 100644 --- a/picc_to_pcsc/Makefile +++ b/picc_to_pcsc/Makefile @@ -1,6 +1,13 @@ -SUBDIRS = ccid picc_to_pcsc virtualsmartcard +MAKEFLAGS += -rR --no-print-directory -default: all +# Compiler +CC = gcc +CFLAGS = -Wall -g +LIBPCSCLITE_CFLAGS = `pkg-config --cflags --libs libpcsclite` -%: - for d in $(SUBDIRS); do $(MAKE) $@ -C $$d; done +TARGETS = picc_to_pcsc + +all: $(TARGETS) + +picc_to_pcsc: picc_to_pcsc.c picc_to_pcsc.h + $(CC) $(CFLAGS) $(LIBPCSCLITE_CFLAGS) picc_to_pcsc.c -o $@ diff --git a/picc_to_pcsc/picc_to_pcsc.c b/picc_to_pcsc/picc_to_pcsc.c index 8de6c7f..befe0ae 100644 --- a/picc_to_pcsc/picc_to_pcsc.c +++ b/picc_to_pcsc/picc_to_pcsc.c @@ -160,7 +160,7 @@ unsigned int read_from_device(unsigned char *inputBuffer) { buf = malloc(length); if(buf == NULL) { fprintf(stderr, "WAHH!\n"); return 0; } int pos=0; - while(sscanf(line+(pos*3+5), " %x ", &(buf[pos])) == 1) { + while(sscanf(line+(pos*3+5), " %x ", (unsigned int *) &(buf[pos])) == 1) { printf("[%02X]", buf[pos]); if(++pos >= length) break; }