From: Pavel Charvat Date: Wed, 7 May 2014 07:29:58 +0000 (+0200) Subject: Build: Fixed few compilation warnings/errors. X-Git-Tag: v6.0~49 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=d0dc1d6dd693d9824e82ffd9d987fceac960b9e6;p=libucw.git Build: Fixed few compilation warnings/errors. --- diff --git a/images/Makefile b/images/Makefile index acd93bec..1e46ff5b 100644 --- a/images/Makefile +++ b/images/Makefile @@ -62,6 +62,7 @@ MAGICK_LIBS:=$(shell GraphicsMagick-config --libs) MAGICK_CPPFLAGS:=$(shell GraphicsMagick-config --cppflags) LIBIMAGES_LIBS+=$(MAGICK_LIBS) $(o)/images/io-libmagick.o: CFLAGS+=$(MAGICK_CPPFLAGS) +$(o)/images/io-libmagick.o: LIBS+=-lpthread endif PROGS+=$(LIBIMAGES_PROGS) @@ -81,6 +82,7 @@ $(o)/images/ucw-image-sim-test: $(o)/images/ucw-image-sim-test.o $(LIBIMAGES) $( TESTS+=$(o)/images/image-test.test $(o)/images/image-test: $(o)/images/image-test.o $(LIBIMAGES) $(LIBUCW) +$(o)/images/image-test: LIBS+=-lpthread $(o)/images/image-test.test: $(o)/images/image-test TESTS+=$(o)/images/color.test diff --git a/ucw/sha1-hmac.c b/ucw/sha1-hmac.c index bc062ff5..deef11f7 100644 --- a/ucw/sha1-hmac.c +++ b/ucw/sha1-hmac.c @@ -77,7 +77,8 @@ sha1_hmac(byte *outbuf, const byte *key, uns keylen, const byte *data, uns datal static uns rd(char *dest) { char buf[1024]; - fgets(buf, sizeof(buf), stdin); + if (!fgets(buf, sizeof(buf), stdin)) + die("fgets()"); *strchr(buf, '\n') = 0; if (buf[0] == '0' && buf[1] == 'x') {