diff options
author | bde <bde@FreeBSD.org> | 1998-07-07 04:36:23 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1998-07-07 04:36:23 +0000 |
commit | 55b8a9ebf0bfec18ecb357b8f0e8f8b45c321c31 (patch) | |
tree | 398e4f6b26a72c58d5464225401b2a6fb5be8d7b | |
parent | 111c756db023bf8ef9846735a86040744813e7b1 (diff) | |
download | FreeBSD-src-55b8a9ebf0bfec18ecb357b8f0e8f8b45c321c31.zip FreeBSD-src-55b8a9ebf0bfec18ecb357b8f0e8f8b45c321c31.tar.gz |
Don't depend on gcc's feature of casting lvalues.
-rw-r--r-- | sys/kern/link_aout.c | 5 | ||||
-rw-r--r-- | sys/kern/vfs_cluster.c | 9 |
2 files changed, 8 insertions, 6 deletions
diff --git a/sys/kern/link_aout.c b/sys/kern/link_aout.c index 5afe7c9..3bbd072 100644 --- a/sys/kern/link_aout.c +++ b/sys/kern/link_aout.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: link_aout.c,v 1.5 1997/11/20 20:07:50 bde Exp $ + * $Id: link_aout.c,v 1.6 1998/06/07 17:11:36 dfr Exp $ */ #include <sys/param.h> @@ -159,7 +159,8 @@ link_aout_load_file(const char* filename, linker_file_t* result) free(af, M_LINKER); goto out; } - (long) af->dynamic->d_un.d_sdt += af->address; + af->dynamic->d_un.d_sdt = (struct section_dispatch_table *) + ((char *)af->dynamic->d_un.d_sdt + (vm_offset_t)af->address); lf = linker_make_file(filename, af, &link_aout_file_ops); if (lf == NULL) { diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c index b490ad5..1d06f8b 100644 --- a/sys/kern/vfs_cluster.c +++ b/sys/kern/vfs_cluster.c @@ -33,7 +33,7 @@ * SUCH DAMAGE. * * @(#)vfs_cluster.c 8.7 (Berkeley) 2/13/94 - * $Id: vfs_cluster.c,v 1.62 1998/05/21 07:47:42 dyson Exp $ + * $Id: vfs_cluster.c,v 1.63 1998/07/04 20:45:32 julian Exp $ */ #include "opt_debug_cluster.h" @@ -342,7 +342,8 @@ cluster_rbuild(vp, filesize, lbn, blkno, size, run, fbp) if (bp == 0) return tbp; - (vm_offset_t) bp->b_data |= ((vm_offset_t) tbp->b_data) & PAGE_MASK; + bp->b_data = (char *)((vm_offset_t)bp->b_data | + ((vm_offset_t)tbp->b_data & PAGE_MASK)); bp->b_flags = B_ASYNC | B_READ | B_CALL | B_BUSY | B_CLUSTER | B_VMIO; bp->b_iodone = cluster_callback; bp->b_blkno = blkno; @@ -696,8 +697,8 @@ cluster_wbuild(vp, size, start_lbn, len) bp->b_blkno = tbp->b_blkno; bp->b_lblkno = tbp->b_lblkno; bp->b_offset = tbp->b_offset; - (vm_offset_t) bp->b_data |= - ((vm_offset_t) tbp->b_data) & PAGE_MASK; + bp->b_data = (char *)((vm_offset_t)bp->b_data | + ((vm_offset_t)tbp->b_data & PAGE_MASK)); bp->b_flags |= B_CALL | B_BUSY | B_CLUSTER | (tbp->b_flags & (B_VMIO | B_NEEDCOMMIT)); bp->b_iodone = cluster_callback; |