Add casts.
diff --git a/regress/source_hole.c b/regress/source_hole.c
index ae6e7fb..c2d7b92 100644
--- a/regress/source_hole.c
+++ b/regress/source_hole.c
@@ -434,14 +434,14 @@
 {
     zip_uint8_t b[8];
     
-    b[0] = u64 >> 56;
-    b[1] = (u64 >> 48) & 0xff;
-    b[2] = (u64 >> 40) & 0xff;
-    b[3] = (u64 >> 32) & 0xff;
-    b[4] = (u64 >> 24) & 0xff;
-    b[5] = (u64 >> 16) & 0xff;
-    b[6] = (u64 >> 8) & 0xff;
-    b[7] = u64 & 0xff;
+    b[0] = (zip_uint8_t)((u64 >> 56) & 0xff);
+    b[1] = (zip_uint8_t)((u64 >> 48) & 0xff);
+    b[2] = (zip_uint8_t)((u64 >> 40) & 0xff);
+    b[3] = (zip_uint8_t)((u64 >> 32) & 0xff);
+    b[4] = (zip_uint8_t)((u64 >> 24) & 0xff);
+    b[5] = (zip_uint8_t)((u64 >> 16) & 0xff);
+    b[6] = (zip_uint8_t)((u64 >> 8) & 0xff);
+    b[7] = (zip_uint8_t)(u64 & 0xff);
     
     return fwrite(b, 8, 1, f) == 1 ? 0 : -1;
 }