Skip to content

Commit

Permalink
eliminate compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Feb 26, 2022
1 parent 366c9cb commit da5f825
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions MagickCache/magick-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 =
Expand Down Expand Up @@ -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 =
Expand Down
6 changes: 3 additions & 3 deletions utilities/magick-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
{ \
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit da5f825

Please sign in to comment.