* po/da.po: Updated Danish translation.
[deliverable/binutils-gdb.git] / binutils / windmc.c
index 283c2657506d79dcf875e6046cc8b7c38e0d3977..c7aa8f8e4e9704b237e6655251cd0adc6173059c 100644 (file)
@@ -175,7 +175,7 @@ res_init (void)
 void *
 res_alloc (rc_uint_type bytes)
 {
-  return (void *) obstack_alloc (&res_obstack, (size_t) bytes);
+  return obstack_alloc (&res_obstack, (size_t) bytes);
 }
 
 static FILE *
@@ -1144,7 +1144,7 @@ main (int argc, char **argv)
     unichar *u;
     rc_uint_type ul;
     char *buff;
-    long flen;
+    bfd_size_type flen;
     FILE *fp = fopen (input_filename, "rb");
 
     if (!fp)
@@ -1155,7 +1155,8 @@ main (int argc, char **argv)
     fseek (fp, 0, SEEK_SET);
     buff = malloc (flen + 3);
     memset (buff, 0, flen + 3);
-    fread (buff, 1, flen, fp);
+    if (fread (buff, 1, flen, fp) < flen)
+      fatal (_("unable to read contents of %s"), input_filename);
     fclose (fp);
     if (mcset_text_in_is_unicode != 1)
       {
This page took 0.02308 seconds and 4 git commands to generate.