diff --git a/magick/memory.c b/magick/memory.c
index 077b5f8..095c195 100644
--- a/magick/memory.c
+++ b/magick/memory.c
@@ -137,7 +137,12 @@
   Global declarations.
 */
 static MagickMemoryMethods
-  memory_methods = { malloc, realloc, free };
+  memory_methods =
+  {
+    (AcquireMemoryHandler) malloc,
+    (ResizeMemoryHandler) realloc,
+    (DestroyMemoryHandler)free
+  };
 
 #if defined(MAGICKCORE_EMBEDDABLE_SUPPORT)
 static MemoryInfo
diff --git a/magick/xwindow.c b/magick/xwindow.c
index 3fae76c..cb640f1 100644
--- a/magick/xwindow.c
+++ b/magick/xwindow.c
@@ -5453,9 +5453,9 @@
             }
         }
       width=(unsigned int) window->image->columns;
-      assert(width == window->image->columns);
+      assert((unsigned long) width == window->image->columns);
       height=(unsigned int) window->image->rows;
-      assert(height == window->image->rows);
+      assert((unsigned long) height == window->image->rows);
     }
   /*
     Create X image.