diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-05-20 03:04:26 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-05-20 03:04:26 +0200 |
commit | 24873f0c06e6196a105f648e8fe29d19dcddd1de (patch) | |
tree | f0ad6ae52390a9ed3b63c6fe228da30f5cf92d7b /lib/workqueue.c | |
parent | bgpd: bgpd-no-as.patch (diff) | |
download | frr-24873f0c06e6196a105f648e8fe29d19dcddd1de.tar.xz frr-24873f0c06e6196a105f648e8fe29d19dcddd1de.zip |
lib: lib-warnings.patch
Remove compile warnings for the lib directory
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by:
Diffstat (limited to 'lib/workqueue.c')
-rw-r--r-- | lib/workqueue.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/workqueue.c b/lib/workqueue.c index a7f4b7071..6fad237e1 100644 --- a/lib/workqueue.c +++ b/lib/workqueue.c @@ -30,7 +30,11 @@ #include "log.h" /* master list of work_queues */ -static struct list work_queues; +static struct list _work_queues; +/* pointer primarly to avid an otherwise harmless warning on + * ALL_LIST_ELEMENTS_RO + */ +static struct list *work_queues = &_work_queues; #define WORK_QUEUE_MIN_GRANULARITY 1 @@ -78,7 +82,7 @@ work_queue_new (struct thread_master *m, const char *queue_name) new->items->del = (void (*)(void *)) work_queue_item_free; - listnode_add (&work_queues, new); + listnode_add (work_queues, new); new->cycles.granularity = WORK_QUEUE_MIN_GRANULARITY; @@ -97,7 +101,7 @@ work_queue_free (struct work_queue *wq) /* list_delete frees items via callback */ list_delete (wq->items); - listnode_delete (&work_queues, wq); + listnode_delete (work_queues, wq); XFREE (MTYPE_WORK_QUEUE_NAME, wq->name); XFREE (MTYPE_WORK_QUEUE, wq); @@ -191,7 +195,7 @@ DEFUN(show_work_queues, "Name", VTY_NEWLINE); - for (ALL_LIST_ELEMENTS_RO ((&work_queues), node, wq)) + for (ALL_LIST_ELEMENTS_RO (work_queues, node, wq)) { vty_out (vty,"%c %8d %5d %8ld %8ld %7d %6d %8ld %6u %s%s", (CHECK_FLAG (wq->flags, WQ_UNPLUGGED) ? ' ' : 'P'), |