Project

General

Profile

Actions

Bug #10668

closed

e1000g: NULL pointer errors

Added by Toomas Soome about 5 years ago. Updated about 5 years ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

Build errors with NULL pointer:

    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/e1000g/e1000g_sw.h:47,
                     from ../../common/io/e1000g/e1000g_tx.c:44:
    ../../common/io/e1000g/e1000g_tx.c: In function 'e1000g_send':
    ../../common/sys/null.h:32:14: error: passing argument 2 of 'allocb' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/e1000g/e1000g_tx.c:302:34: note: in expansion of macro 'NULL'
        new_mp = allocb(hdr_frag_len, NULL);
                                      ^~~~
    In file included from ../../common/io/e1000g/e1000g_sw.h:50:0,
                     from ../../common/io/e1000g/e1000g_tx.c:44:
    ../../common/sys/stream.h:782:16: note: expected 'uint_t {aka unsigned int}' but argument is of type 'void *'
     extern mblk_t *allocb(size_t, uint_t);
                    ^~~~~~

    ../../common/io/e1000g/e1000g_alloc.c: In function 'e1000g_free_rx_descriptors':
    ../../common/io/e1000g/e1000g_alloc.c:666:24: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
      rx_data->rbd_dma_addr = NULL;
                            ^
    ../../common/io/e1000g/e1000g_alloc.c: In function 'e1000g_free_tx_descriptors':
    ../../common/io/e1000g/e1000g_alloc.c:686:24: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
      tx_ring->tbd_dma_addr = NULL;
                            ^
    ../../common/io/e1000g/e1000g_alloc.c: In function 'e1000g_free_dma_buffer':
    ../../common/io/e1000g/e1000g_alloc.c:1106:19: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
      buf->dma_address = NULL;
                       ^
    cc1: all warnings being treated as errors

Actions

Also available in: Atom PDF