Actions
Bug #10668
closede1000g: NULL pointer errors
Start date:
2019-04-02
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
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
Updated by Electric Monk about 3 years ago
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
git commit f52680fe552c1a5f149342ab191a00a072db59c5
commit f52680fe552c1a5f149342ab191a00a072db59c5 Author: Toomas Soome <tsoome@me.com> Date: 2019-04-10T06:26:04.000Z 10668 e1000g: NULL pointer errors Reviewed by: Andy Stormont <astormont@racktopsystems.com> Reviewed by: Robert Mustacchi <rm@joyent.com> Reviewed by: Gergő Doma <domag02@gmail.com> Approved by: Dan McDonald <danmcd@joyent.com>
Actions