]> mj.ucw.cz Git - libucw.git/commitdiff
Build: Fixed few compilation warnings/errors.
authorPavel Charvat <pchar@ucw.cz>
Wed, 7 May 2014 07:29:58 +0000 (09:29 +0200)
committerPavel Charvat <pchar@ucw.cz>
Wed, 7 May 2014 07:29:58 +0000 (09:29 +0200)
images/Makefile
ucw/sha1-hmac.c

index acd93becb7675d1d5e41602e4067258cca7d0f5d..1e46ff5bfe3a83717b588f7397fa0977f4b30ff2 100644 (file)
@@ -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
index bc062ff5006637cd082d147b61c4ecc813e9758b..deef11f7d9dabb9f6a755165a05ee2d1553fc645 100644 (file)
@@ -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')
     {