cli: fix warnings with -Wswitch-default

mmcli-output.c: In function ‘output_item_free’:
  mmcli-output.c:321:5: error: switch missing default case [-Werror=switch-default]
    321 |     switch (item->type) {
        |     ^~~~~~
  mmcli-output.c: In function ‘mmcli_output_dump’:
  mmcli-output.c:1208:5: error: switch missing default case [-Werror=switch-default]
   1208 |     switch (selected_type) {
        |     ^~~~~~
  mmcli-output.c: In function ‘mmcli_output_list_dump’:
  mmcli-output.c:1231:5: error: switch missing default case [-Werror=switch-default]
   1231 |     switch (selected_type) {
        |     ^~~~~~
This commit is contained in:
Aleksander Morgado
2020-01-31 10:08:08 +01:00
parent c32fdcefef
commit 1216e88716
2 changed files with 8 additions and 3 deletions

View File

@@ -332,6 +332,8 @@ output_item_free (OutputItem *item)
g_free (((OutputItemListitem *)item)->value);
g_free (((OutputItemListitem *)item)->extra);
break;
default:
g_assert_not_reached ();
}
}
@@ -1217,6 +1219,8 @@ mmcli_output_dump (void)
case MMC_OUTPUT_TYPE_JSON:
dump_output_json ();
break;
default:
g_assert_not_reached ();
}
g_list_free_full (output_items, (GDestroyNotify) output_item_free);
@@ -1240,6 +1244,8 @@ mmcli_output_list_dump (MmcF field)
case MMC_OUTPUT_TYPE_JSON:
dump_output_list_json (field);
break;
default:
g_assert_not_reached ();
}
g_list_free_full (output_items, (GDestroyNotify) output_item_free);