Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sparc64/dev Avoid "cast to pointer from integer of ...



details:   https://anonhg.NetBSD.org/src/rev/a728ded6d092
branches:  trunk
changeset: 817455:a728ded6d092
user:      nakayama <nakayama%NetBSD.org@localhost>
date:      Sat Aug 20 18:21:18 2016 +0000

description:
Avoid "cast to pointer from integer of different size" warning on
32-bit kernels.

diffstat:

 sys/arch/sparc64/dev/ldc.c  |  14 +++++++-------
 sys/arch/sparc64/dev/vdsk.c |   4 ++--
 2 files changed, 9 insertions(+), 9 deletions(-)

diffs (81 lines):

diff -r 3f206008ff64 -r a728ded6d092 sys/arch/sparc64/dev/ldc.c
--- a/sys/arch/sparc64/dev/ldc.c        Sat Aug 20 18:04:04 2016 +0000
+++ b/sys/arch/sparc64/dev/ldc.c        Sat Aug 20 18:21:18 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ldc.c,v 1.1 2016/08/19 19:02:07 palle Exp $    */
+/*     $NetBSD: ldc.c,v 1.2 2016/08/20 18:21:18 nakayama Exp $ */
 /*     $OpenBSD: ldc.c,v 1.12 2015/03/21 18:02:58 kettenis Exp $       */
 /*
  * Copyright (c) 2009 Mark Kettenis
@@ -256,7 +256,7 @@
                return;
        }
 
-       lp = (struct ldc_pkt *)(lc->lc_txq->lq_va + tx_tail);
+       lp = (struct ldc_pkt *)(uintptr_t)(lc->lc_txq->lq_va + tx_tail);
        bzero(lp, sizeof(struct ldc_pkt));
        lp->type = LDC_CTRL;
        lp->stype = LDC_INFO;
@@ -291,7 +291,7 @@
                return;
        }
 
-       lp = (struct ldc_pkt *)(lc->lc_txq->lq_va + tx_tail);
+       lp = (struct ldc_pkt *)(uintptr_t)(lc->lc_txq->lq_va + tx_tail);
        bzero(lp, sizeof(struct ldc_pkt));
        lp->type = LDC_CTRL;
        lp->stype = LDC_ACK;
@@ -326,7 +326,7 @@
                return;
        }
 
-       lp = (struct ldc_pkt *)(lc->lc_txq->lq_va + tx_tail);
+       lp = (struct ldc_pkt *)(uintptr_t)(lc->lc_txq->lq_va + tx_tail);
        bzero(lp, sizeof(struct ldc_pkt));
        lp->type = LDC_CTRL;
        lp->stype = LDC_INFO;
@@ -361,7 +361,7 @@
                return;
        }
 
-       lp = (struct ldc_pkt *)(lc->lc_txq->lq_va + tx_tail);
+       lp = (struct ldc_pkt *)(uintptr_t)(lc->lc_txq->lq_va + tx_tail);
        bzero(lp, sizeof(struct ldc_pkt));
        lp->type = LDC_CTRL;
        lp->stype = LDC_INFO;
@@ -396,7 +396,7 @@
                return;
        }
 
-       lp = (struct ldc_pkt *)(lc->lc_txq->lq_va + tx_tail);
+       lp = (struct ldc_pkt *)(uintptr_t)(lc->lc_txq->lq_va + tx_tail);
        bzero(lp, sizeof(struct ldc_pkt));
        lp->type = LDC_CTRL;
        lp->stype = LDC_INFO;
@@ -442,7 +442,7 @@
        }
 
        while (len > 0) {
-               lp = (struct ldc_pkt *)(lc->lc_txq->lq_va + tx_tail);
+               lp = (struct ldc_pkt *)(uintptr_t)(lc->lc_txq->lq_va + tx_tail);
                bzero(lp, sizeof(struct ldc_pkt));
                lp->type = LDC_DATA;
                lp->stype = LDC_INFO;
diff -r 3f206008ff64 -r a728ded6d092 sys/arch/sparc64/dev/vdsk.c
--- a/sys/arch/sparc64/dev/vdsk.c       Sat Aug 20 18:04:04 2016 +0000
+++ b/sys/arch/sparc64/dev/vdsk.c       Sat Aug 20 18:21:18 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vdsk.c,v 1.1 2016/08/19 19:02:07 palle Exp $   */
+/*     $NetBSD: vdsk.c,v 1.2 2016/08/20 18:21:18 nakayama Exp $        */
 /*     $OpenBSD: vdsk.c,v 1.46 2015/01/25 21:42:13 kettenis Exp $      */
 /*
  * Copyright (c) 2009, 2011 Mark Kettenis
@@ -542,7 +542,7 @@
        if (rx_head == rx_tail)
                return (0);
 
-       lp = (struct ldc_pkt *)(lc->lc_rxq->lq_va + rx_head);
+       lp = (struct ldc_pkt *)(uintptr_t)(lc->lc_rxq->lq_va + rx_head);
        switch (lp->type) {
                case LDC_CTRL:
                        ldc_rx_ctrl(lc, lp);



Home | Main Index | Thread Index | Old Index