10384 chxge: NULL pointer errors

Review Request #1459 - Created Feb. 11, 2019 and submitted

Information
Toomas Soome
illumos-gate
10384
000fdd5...
Reviewers
general
../../common/io/chxge/sge.c: In function 'free_cmdQ_buffers':
../../common/io/chxge/sge.c:1186:38: error: comparison between pointer and integer [-Werror]
    if (skb && ((ce->ce_flg & CH_ARP) == NULL)) {
                                      ^~

../../common/io/chxge/pe.c: In function 'pe_start':
../../common/io/chxge/pe.c:305:17: error: comparison between pointer and integer [-Werror]
   if (sa->ch_ip == NULL) {
                 ^~
../../common/io/chxge/pe.c:470:13: error: comparison between pointer and integer [-Werror]
    if (lseg == NULL) {
             ^~
../../common/io/chxge/pe.c:546:12: error: comparison between pointer and integer [-Werror]
   if (nseg == NULL) {
            ^~
../../common/io/chxge/pe.c: In function 'pe_attach':
../../common/io/chxge/pe.c:922:35: error: comparison between pointer and integer [-Werror]
  if (pe_small_rbuf_pool_init(chp) == NULL)
                                   ^~
../../common/io/chxge/pe.c:925:33: error: comparison between pointer and integer [-Werror]
  if (pe_big_rbuf_pool_init(chp) == NULL)
                                 ^~

../../common/io/chxge/ch.c: In function '_fini':
../../common/io/chxge/ch.c:322:8: error: comparison between pointer and integer [-Werror]
  if (t != NULL)
        ^~
In file included from ../../common/sys/param.h:48:0,
                 from ../../common/sys/t_lock.h:38,
                 from ../../common/sys/conf.h:37,
                 from ../../common/io/chxge/ch.c:47:
../../common/io/chxge/ch.c: In function 'ch_get_prop':
../../common/sys/null.h:32:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../../common/io/chxge/ch.c:1918:22: note: in expansion of macro 'NULL'
  uint32_t prop_len = NULL;
                      ^~~~
../../common/io/chxge/ch.c:1997:21: error: comparison between pointer and integer [-Werror]
   if ((v & 0x20000) == NULL) {
                     ^~
../../common/io/chxge/ch.c:2260:11: error: comparison between pointer and integer [-Werror]
   if (val == NULL)
           ^~
cc1: all warnings being treated as errors

  
Andy Fiddaman
Andrew Stormont
Gergő Mihály Doma
Toomas Soome
Review request changed

Status: Closed (submitted)

Loading...