summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--getgbook.c7
-rw-r--r--util.c1
3 files changed, 4 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index e8ab26f..906a92b 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@ all: getgbook
.c.o:
@echo CC $<
- @$(CC) -c -g $(CFLAGS) $<
+ @$(CC) -c -g -Wall $(CFLAGS) $<
$(OBJ): util.c
diff --git a/getgbook.c b/getgbook.c
index 98e1b0b..6f6870f 100644
--- a/getgbook.c
+++ b/getgbook.c
@@ -45,9 +45,8 @@ char *getgbookid(char *isbn)
int main(int argc, char *argv[])
{
- int i, s;
- char *bookid, url[80], isbn[16];
- char *curpage;
+ int i;
+ char *bookid, isbn[16];
FILE *srv;
if(argc != 2)
@@ -58,9 +57,7 @@ int main(int argc, char *argv[])
i = dial(hostname, "80");
srv = fdopen(i, "r+");
- /* get google book id */
bookid = getgbookid(isbn);
-
printf("bookid is %s\n", bookid);
free(bookid);
diff --git a/util.c b/util.c
index 3f969a6..5c3cb23 100644
--- a/util.c
+++ b/util.c
@@ -1,5 +1,6 @@
/* See COPYING file for copyright, license and warranty details. */
+#include <unistd.h>
#include <netdb.h>
#include <netinet/in.h>
#include <sys/socket.h>