Project

General

Profile

Bug #10384

chxge: NULL pointer errors

Added by Toomas Soome 5 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
driver - device drivers
Start date:
2019-02-11
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

Build errors with NULL Pointer:

    ../../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

History

#1

Updated by Electric Monk 5 months ago

  • % Done changed from 90 to 100
  • Status changed from In Progress to Closed

git commit 11abda1ec53d8ea02c8075bf291837a6350587fa

commit  11abda1ec53d8ea02c8075bf291837a6350587fa
Author: Toomas Soome <tsoome@me.com>
Date:   2019-02-16T07:50:18.000Z

    10384 chxge: NULL pointer errors
    Reviewed by: Andy Stormont <astormont@racktopsystems.com>
    Reviewed by: Andy Fiddaman <andy@omniosce.org>
    Reviewed by: Gergő Mihály Doma <domag02@gmail.com>
    Approved by: Robert Mustacchi <rm@joyent.com>

Also available in: Atom PDF