https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=24413
diff --git a/coders/ghostscript-private.h b/coders/ghostscript-private.h
index 836f3f2..2d3f0f8 100644
--- a/coders/ghostscript-private.h
+++ b/coders/ghostscript-private.h
@@ -1,12 +1,12 @@
 /*
   Copyright 1999-2020 ImageMagick Studio LLC, a non-profit organization
   dedicated to making software imaging solutions freely available.
-  
+
   You may not use this file except in compliance with the License.  You may
   obtain a copy of the License at
-  
+
     https://imagemagick.org/script/license.php
-  
+
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -31,22 +31,22 @@
   offset=0;
   messages=(char **) handle;
   if (*messages == (char *) NULL)
-    *messages=(char *) AcquireQuantumMemory(length+1,sizeof(char *));
+    *messages=(char *) AcquireQuantumMemory((size_t) length+1,sizeof(char *));
   else
     {
-      offset=strlen(*messages);
-      *messages=(char *) ResizeQuantumMemory(*messages,offset+length+1,
-        sizeof(char *));
+      offset=(ssize_t) strlen(*messages);
+      *messages=(char *) ResizeQuantumMemory(*messages,(size_t) (offset+length+
+        1),sizeof(char *));
     }
   if (*messages == (char *) NULL)
     return(0);
-  (void) memcpy(*messages+offset,message,length);
+  (void) memcpy(*messages+offset,message,(size_t) length);
   (*messages)[length+offset] ='\0';
   return(length);
 }
 #endif
 
-static MagickBooleanType InvokeGhostscriptDelegate(
+static inline MagickBooleanType InvokeGhostscriptDelegate(
   const MagickBooleanType verbose,const char *command,char *message,
   ExceptionInfo *exception)
 {
@@ -127,7 +127,7 @@
 #endif
   if (ghost_info == (GhostInfo *) NULL)
     ExecuteGhostscriptCommand(command,status);
-  if ((ghost_info->revision)(&revision,sizeof(revision)) != 0)
+  if ((ghost_info->revision)(&revision,(int) sizeof(revision)) != 0)
     revision.revision=0;
   if (verbose != MagickFalse)
     {
@@ -206,7 +206,7 @@
   return(MagickFalse);
 }
 
-static void ReadGhostScriptXMPProfile(MagickByteBuffer *buffer,
+static inline void ReadGhostScriptXMPProfile(MagickByteBuffer *buffer,
   StringInfo **profile)
 {
 #define BeginXMPPacket  "?xpacket begin="