10867 ehci: comparison between pointer and integer

Review Request #1800 - Created April 28, 2019 and submitted

Information
Toomas Soome
illumos-gate
10867
3640596...
Reviewers
general
In file included from ../../common/sys/model.h:35:0,
                 from ../../common/sys/resource.h:221,
                 from ../../common/sys/vnode.h:51,
                 from ../../common/vm/seg.h:43,
                 from ../../common/vm/as.h:47,
                 from ../../common/sys/devops.h:37,
                 from ../../common/sys/sunddi.h:39,
                 from ../../common/sys/usb/hcd/ehci/ehci.h:47,
                 from ../../common/sys/usb/hcd/ehci/ehcid.h:45,
                 from ../../common/io/usb/hcd/ehci/ehci_isoch_util.c:37:
../../common/io/usb/hcd/ehci/ehci_isoch_util.c: In function 'ehci_allocate_itw':
../../common/io/usb/hcd/ehci/ehci_isoch_util.c:490:21: error: comparison between pointer and integer [-Werror]
  ASSERT(itw->itw_id != NULL);
                     ^
../../common/sys/debug.h:59:29: note: in definition of macro 'ASSERT'
 #define ASSERT(EX) ((void)((EX) || assfail(#EX, __FILE__, __LINE__)))
                             ^~
../../common/io/usb/hcd/ehci/ehci_isoch_util.c: In function 'ehci_free_itw_dma':
../../common/io/usb/hcd/ehci/ehci_isoch_util.c:593:21: error: comparison between pointer and integer [-Werror]
  ASSERT(itw->itw_id != NULL);
                     ^
../../common/sys/debug.h:59:29: note: in definition of macro 'ASSERT'
 #define ASSERT(EX) ((void)((EX) || assfail(#EX, __FILE__, __LINE__)))
                             ^~

In file included from ../../common/sys/model.h:35:0,
                 from ../../common/sys/resource.h:221,
                 from ../../common/sys/vnode.h:51,
                 from ../../common/vm/seg.h:43,
                 from ../../common/vm/as.h:47,
                 from ../../common/sys/devops.h:37,
                 from ../../common/sys/sunddi.h:39,
                 from ../../common/sys/usb/hcd/ehci/ehci.h:47,
                 from ../../common/sys/usb/hcd/ehci/ehcid.h:45,
                 from ../../common/io/usb/hcd/ehci/ehci_xfer.c:37:
../../common/io/usb/hcd/ehci/ehci_xfer.c: In function 'ehci_insert_async_qh':
../../common/io/usb/hcd/ehci/ehci_xfer.c:584:50: error: comparison between pointer and integer [-Werror]
  ASSERT((Get_QH(qh->qh_prev) & EHCI_QH_LINK_PTR) == NULL);
                                                  ^
../../common/sys/debug.h:59:29: note: in definition of macro 'ASSERT'
 #define ASSERT(EX) ((void)((EX) || assfail(#EX, __FILE__, __LINE__)))
                             ^~
../../common/io/usb/hcd/ehci/ehci_xfer.c: In function 'ehci_insert_intr_qh':
../../common/io/usb/hcd/ehci/ehci_xfer.c:682:50: error: comparison between pointer and integer [-Werror]
  ASSERT((Get_QH(qh->qh_prev) & EHCI_QH_LINK_PTR) == NULL);
                                                  ^
../../common/sys/debug.h:59:29: note: in definition of macro 'ASSERT'
 #define ASSERT(EX) ((void)((EX) || assfail(#EX, __FILE__, __LINE__)))
                             ^~
../../common/io/usb/hcd/ehci/ehci_xfer.c: In function 'ehci_insert_qh_on_reclaim_list':
../../common/io/usb/hcd/ehci/ehci_xfer.c:1307:37: error: comparison between pointer and integer [-Werror]
  ASSERT(Get_QH(qh->qh_reclaim_next) == NULL);
                                     ^
../../common/sys/debug.h:59:29: note: in definition of macro 'ASSERT'
 #define ASSERT(EX) ((void)((EX) || assfail(#EX, __FILE__, __LINE__)))
                             ^~
../../common/io/usb/hcd/ehci/ehci_xfer.c: In function 'ehci_fill_in_qtd':
../../common/io/usb/hcd/ehci/ehci_xfer.c:2509:19: error: comparison between pointer and integer [-Werror]
  ASSERT(tw->tw_id != NULL);
                   ^
../../common/sys/debug.h:59:29: note: in definition of macro 'ASSERT'
 #define ASSERT(EX) ((void)((EX) || assfail(#EX, __FILE__, __LINE__)))
                             ^~
../../common/io/usb/hcd/ehci/ehci_xfer.c: In function 'ehci_insert_qtd_on_tw':
../../common/io/usb/hcd/ehci/ehci_xfer.c:2552:40: error: comparison between pointer and integer [-Werror]
   ASSERT(Get_QTD(qtd->qtd_tw_next_qtd) == NULL);
                                        ^
../../common/sys/debug.h:59:29: note: in definition of macro 'ASSERT'
 #define ASSERT(EX) ((void)((EX) || assfail(#EX, __FILE__, __LINE__)))
                             ^~
../../common/io/usb/hcd/ehci/ehci_xfer.c: In function 'ehci_create_transfer_wrapper':
../../common/io/usb/hcd/ehci/ehci_xfer.c:3103:19: error: comparison between pointer and integer [-Werror]
  ASSERT(tw->tw_id != NULL);
                   ^
../../common/sys/debug.h:59:29: note: in definition of macro 'ASSERT'
 #define ASSERT(EX) ((void)((EX) || assfail(#EX, __FILE__, __LINE__)))
                             ^~
../../common/io/usb/hcd/ehci/ehci_xfer.c: In function 'ehci_free_tw':
../../common/io/usb/hcd/ehci/ehci_xfer.c:3530:19: error: comparison between pointer and integer [-Werror]
  ASSERT(tw->tw_id != NULL);
                   ^
../../common/sys/debug.h:59:29: note: in definition of macro 'ASSERT'
 #define ASSERT(EX) ((void)((EX) || assfail(#EX, __FILE__, __LINE__)))
                             ^~

In file included from ../../common/sys/model.h:35:0,
                 from ../../common/sys/resource.h:221,
                 from ../../common/sys/vnode.h:51,
                 from ../../common/vm/seg.h:43,
                 from ../../common/vm/as.h:47,
                 from ../../common/sys/devops.h:37,
                 from ../../common/sys/sunddi.h:39,
                 from ../../common/sys/usb/hcd/ehci/ehci.h:47,
                 from ../../common/sys/usb/hcd/ehci/ehcid.h:45,
                 from ../../common/io/usb/hcd/ehci/ehci_polled.c:39:
../../common/io/usb/hcd/ehci/ehci_polled.c: In function 'ehci_polled_insert_qtd_on_tw':
../../common/io/usb/hcd/ehci/ehci_polled.c:1787:40: error: comparison between pointer and integer [-Werror]
   ASSERT(Get_QTD(qtd->qtd_tw_next_qtd) == NULL);
                                        ^
../../common/sys/debug.h:59:29: note: in definition of macro 'ASSERT'
 #define ASSERT(EX) ((void)((EX) || assfail(#EX, __FILE__, __LINE__)))
                             ^~
../../common/io/usb/hcd/ehci/ehci_polled.c: In function 'ehci_polled_insert_async_qh':
../../common/io/usb/hcd/ehci/ehci_polled.c:2138:50: error: comparison between pointer and integer [-Werror]
  ASSERT((Get_QH(qh->qh_prev) & EHCI_QH_LINK_PTR) == NULL);
                                                  ^
../../common/sys/debug.h:59:29: note: in definition of macro 'ASSERT'
 #define ASSERT(EX) ((void)((EX) || assfail(#EX, __FILE__, __LINE__)))
                             ^~

cc1: all warnings being treated as errors

  
Alexander Pyhalov
x void
Gergő Mihály Doma
Toomas Soome
Review request changed

Status: Closed (submitted)

Loading...