diff --git a/MagickCache/magick-cache.c b/MagickCache/magick-cache.c index 60fb965..b516062 100644 --- a/MagickCache/magick-cache.c +++ b/MagickCache/magick-cache.c @@ -290,7 +290,7 @@ MagickExport MagickCache *AcquireMagickCache(const char *path, cache=DestroyMagickCache(cache); return((MagickCache *) NULL); } - GetMagickCacheSentinel(cache,sentinel); + GetMagickCacheSentinel(cache,(unsigned char *) sentinel); signature=GetMagickCacheSignature(cache->nonce); if (memcmp(&signature,sentinel,sizeof(signature)) != 0) { @@ -958,7 +958,7 @@ MagickExport MagickBooleanType GetMagickCacheResource(MagickCache *cache, path=DestroyString(path); if (sentinel == NULL) return(MagickFalse); - GetMagickCacheResourceSentinel(resource,sentinel); + GetMagickCacheResourceSentinel(resource,(unsigned char *) sentinel); signature=GetMagickCacheSignature(resource->nonce); /* If no cache passkey, generate the resource ID. @@ -1129,8 +1129,8 @@ static MagickBooleanType ResourceToBlob(MagickCacheResource *resource, ssize_t count; - count=read(file,resource->blob+i,(size_t) MagickCacheMin(resource->extent-i, - (size_t) SSIZE_MAX)); + count=read(file,(unsigned char *) resource->blob+i,(size_t) + MagickCacheMin(resource->extent-i,(size_t) SSIZE_MAX)); if (count <= 0) { count=0; @@ -1877,7 +1877,7 @@ MagickExport MagickBooleanType IterateMagickCacheResources(MagickCache *cache, assert(cache != (MagickCache *) NULL); assert(cache->signature == MagickCacheSignature); status=MagickTrue; - head=AcquireCriticalMemory(sizeof(struct ResourceNode)); + head=(ResourceNode *) AcquireCriticalMemory(sizeof(*node)); head->path=AcquireString(cache->path); (void) ConcatenateString(&head->path,"/"); (void) ConcatenateString(&head->path,iri); @@ -1906,7 +1906,7 @@ MagickExport MagickBooleanType IterateMagickCacheResources(MagickCache *cache, } if (S_ISDIR(attributes.st_mode) != 0) { - node=AcquireCriticalMemory(sizeof(struct ResourceNode)); + node=(ResourceNode *) AcquireCriticalMemory(sizeof(*node)); node->path=path; node->next=(struct ResourceNode *) NULL; node->previous=q; diff --git a/Makefile b/Makefile index 4c210db..a6d8d22 100644 --- a/Makefile +++ b/Makefile @@ -208,10 +208,10 @@ AUTOCONF = ${SHELL} /home/cristy/MagickCache-0.9.2/missing autoconf AUTOHEADER = ${SHELL} /home/cristy/MagickCache-0.9.2/missing autoheader AUTOMAKE = ${SHELL} /home/cristy/MagickCache-0.9.2/missing automake-1.16 AWK = gawk -CC = /usr/bin/afl-clang-fast +CC = c++ CCDEPMODE = depmode=gcc3 -CFLAGS = -ggdb -fsanitize=memory,undefined -fno-omit-frame-pointer -CPP = /usr/bin/afl-clang-fast -E +CFLAGS = +CPP = c++ -E CPPFLAGS = CYGPATH_W = echo DEFS = -DHAVE_CONFIG_H @@ -227,7 +227,7 @@ INSTALL_DATA = ${INSTALL} -m 644 INSTALL_PROGRAM = ${INSTALL} INSTALL_SCRIPT = ${INSTALL} INSTALL_STRIP_PROGRAM = $(install_sh) -c -s -LDFLAGS = -ggdb -fsanitize=memory,undefined -fno-omit-frame-pointer +LDFLAGS = LIBOBJS = LIBS = LTLIBOBJS = @@ -277,7 +277,7 @@ abs_builddir = /home/cristy/MagickCache-0.9.2 abs_srcdir = /home/cristy/MagickCache-0.9.2 abs_top_builddir = /home/cristy/MagickCache-0.9.2 abs_top_srcdir = /home/cristy/MagickCache-0.9.2 -ac_ct_CC = /usr/bin/afl-clang-fast +ac_ct_CC = c++ am__include = include am__leading_dot = . am__quote = diff --git a/utilities/magick-cache.c b/utilities/magick-cache.c index 9b6a086..d06c4a5 100644 --- a/utilities/magick-cache.c +++ b/utilities/magick-cache.c @@ -143,7 +143,7 @@ static MagickBooleanType MagickCacheCLI(int argc,char **argv, cache=DestroyMagickCache(cache); \ if (message != (char *) NULL) \ message=DestroyString(message); \ - return(-1); \ + return(MagickFalse); \ } #define ThrowMagickCacheException(cache) \ { \ @@ -295,7 +295,7 @@ static MagickBooleanType MagickCacheCLI(int argc,char **argv, "unable to create magick cache","`%s': %s",path,message); MagickCacheExit(exception); } - return(0); + return(MagickTrue); } cache=AcquireMagickCache(path,passkey); if (cache == (MagickCache *) NULL) @@ -539,7 +539,7 @@ static MagickBooleanType MagickCacheCLI(int argc,char **argv, passkey=DestroyStringInfo(passkey); resource=DestroyMagickCacheResource(resource); cache=DestroyMagickCache(cache); - return(0); + return(MagickTrue); } static int MagickCacheMain(int argc,char **argv)