summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--device/net_io.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/device/net_io.c b/device/net_io.c
index 1958840..ee475ef 100644
--- a/device/net_io.c
+++ b/device/net_io.c
@@ -1158,7 +1158,7 @@ net_set_filter(ifp, rcv_port, priority, filter, filter_count)
net_rcv_port_t infp, my_infp;
net_rcv_port_t nextfp;
net_hash_header_t hhp;
- net_hash_entry_t entp, hash_entp;
+ net_hash_entry_t entp;
net_hash_entry_t *head, nextentp;
queue_entry_t dead_infp, dead_entp;
int i;
@@ -1166,6 +1166,13 @@ net_set_filter(ifp, rcv_port, priority, filter, filter_count)
io_return_t rval;
boolean_t in, out;
+ /* Initialize hash_entp to NULL to quiet GCC
+ * warning about uninitialized variable. hash_entp is only
+ * used when match != 0; in that case it is properly initialized
+ * by kmem_cache_alloc().
+ */
+ net_hash_entry_t hash_entp = NULL;
+
/*
* Check the filter syntax.
*/