Commit 9c592305 by Kaveh R. Ghazi Committed by Kaveh Ghazi

protoize.c (safe_read, safe_write): Avoid the gcc extension of using arithmetic on void pointers.

        * protoize.c (safe_read, safe_write): Avoid the gcc extension of
        using arithmetic on void pointers.

From-SVN: r30043
parent 706c5c2f
Sat Oct 16 11:29:14 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* protoize.c (safe_read, safe_write): Avoid the gcc extension of
using arithmetic on void pointers.
Sat Oct 16 02:48:22 1999 Jeffrey A Law (law@cygnus.com) Sat Oct 16 02:48:22 1999 Jeffrey A Law (law@cygnus.com)
* haifa-sched.c (compute_block_forward_dependencies): Only check * haifa-sched.c (compute_block_forward_dependencies): Only check
......
...@@ -617,7 +617,8 @@ safe_read (desc, ptr, len) ...@@ -617,7 +617,8 @@ safe_read (desc, ptr, len)
} }
if (nchars == 0) if (nchars == 0)
break; break;
ptr += nchars; /* Arithmetic on void pointers is a gcc extention. */
ptr = (char *) ptr + nchars;
left -= nchars; left -= nchars;
} }
return len - left; return len - left;
...@@ -646,7 +647,8 @@ safe_write (desc, ptr, len, out_fname) ...@@ -646,7 +647,8 @@ safe_write (desc, ptr, len, out_fname)
pname, shortpath (NULL, out_fname), xstrerror (errno_val)); pname, shortpath (NULL, out_fname), xstrerror (errno_val));
return; return;
} }
ptr += written; /* Arithmetic on void pointers is a gcc extention. */
ptr = (char *) ptr + written;
len -= written; len -= written;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment