Actions
Bug #10868
closedohci: comparison between pointer and integer
Start date:
2019-04-28
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
Description
Debug build errors with NULL pointer:
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/openhci/ohci.h:49, from ../../common/sys/usb/hcd/openhci/ohcid.h:46, from ../../common/io/usb/hcd/openhci/ohci.c:42: ../../common/io/usb/hcd/openhci/ohci.c: In function 'ohci_insert_ed_on_reclaim_list': ../../common/io/usb/hcd/openhci/ohci.c:4608:40: error: comparison between pointer and integer [-Werror] ASSERT(Get_ED(ept->hced_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/openhci/ohci.c: In function 'ohci_fill_in_td': ../../common/io/usb/hcd/openhci/ohci.c:6041: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/openhci/ohci.c: In function 'ohci_insert_td_on_tw': ../../common/io/usb/hcd/openhci/ohci.c:6407:38: error: comparison between pointer and integer [-Werror] ASSERT(Get_TD(td->hctd_tw_next_td) == 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/openhci/ohci.c: In function 'ohci_create_transfer_wrapper': ../../common/io/usb/hcd/openhci/ohci.c:6974: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/openhci/ohci.c: In function 'ohci_create_isoc_transfer_wrapper': ../../common/io/usb/hcd/openhci/ohci.c:7208: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/openhci/ohci.c: In function 'ohci_free_tw': ../../common/io/usb/hcd/openhci/ohci.c:7622: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/openhci/ohci.h:49, from ../../common/sys/usb/hcd/openhci/ohcid.h:46, from ../../common/io/usb/hcd/openhci/ohci_polled.c:39: ../../common/io/usb/hcd/openhci/ohci_polled.c: In function 'ohci_polled_insert_td_on_tw': ../../common/io/usb/hcd/openhci/ohci_polled.c:2026:38: error: comparison between pointer and integer [-Werror] ASSERT(Get_TD(td->hctd_tw_next_td) == 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/openhci/ohci_polled.c: In function 'ohci_polled_create_tw': ../../common/io/usb/hcd/openhci/ohci_polled.c:2218: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__))) ^~ cc1: all warnings being treated as errors
Updated by Electric Monk over 3 years ago
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
git commit 3eb8c55c1d853cead5cb89c78b077de199f0fb6a
commit 3eb8c55c1d853cead5cb89c78b077de199f0fb6a Author: Toomas Soome <tsoome@me.com> Date: 2019-05-16T18:30:41.000Z 10868 ohci: comparison between pointer and integer Reviewed by: Gergő Doma <domag02@gmail.com> Approved by: Dan McDonald <danmcd@joyent.com>
Actions