ui/ncurses: Remove unused 'cod' variable
authorJeremy Kerr <jk@ozlabs.org>
Mon, 24 Jun 2013 05:03:14 +0000 (13:03 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Mon, 24 Jun 2013 05:07:58 +0000 (13:07 +0800)
When configured with --disable-debug, we get an unused variable warning:

  ui/ncurses/nc-cui.c: In function 'cui_device_remove':
  ui/ncurses/nc-cui.c:439:24: error: unused variable 'cod'
  cc1: all warnings being treated as errors

This change just removes the temporary variable.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
ui/ncurses/nc-cui.c

index 1acc2f0bd0a76e57d6d8e6deb6b066fffcd87594..99955b39fee5cfc2e530ada7978ba005c8225828 100644 (file)
@@ -436,9 +436,8 @@ static void cui_device_remove(struct device *dev, void *arg)
 
        list_for_each_entry(&dev->boot_options, opt, list) {
                struct pmenu_item *i = pmenu_item_from_arg(opt->ui_info);
-               struct cui_opt_data *cod = cod_from_item(i);
 
-               assert(pb_protocol_device_cmp(dev, cod->dev));
+               assert(pb_protocol_device_cmp(dev, cod_from_item(i)->dev));
                pmenu_remove(cui->main, i);
        }