diff --git a/src/libnm-glib-aux/nm-json-aux.h b/src/libnm-glib-aux/nm-json-aux.h index 936e914641..b61c1f843a 100644 --- a/src/libnm-glib-aux/nm-json-aux.h +++ b/src/libnm-glib-aux/nm-json-aux.h @@ -339,6 +339,7 @@ nm_value_type_to_json(NMValueType value_type, GString *gstr, gconstpointer p_fie case NM_VALUE_TYPE_STRING: nm_json_gstr_append_string(gstr, *((const char *const *) p_field)); return; + case NM_VALUE_TYPE_NONE: case NM_VALUE_TYPE_UNSPEC: break; } @@ -368,6 +369,7 @@ nm_value_type_from_json(const NMJsonVt * vt, case NM_VALUE_TYPE_STRING: return (nm_jansson_json_as_string(vt, elem, out_val) > 0); + case NM_VALUE_TYPE_NONE: case NM_VALUE_TYPE_UNSPEC: break; } diff --git a/src/libnm-glib-aux/nm-value-type.h b/src/libnm-glib-aux/nm-value-type.h index 6156896c14..541797e9bf 100644 --- a/src/libnm-glib-aux/nm-value-type.h +++ b/src/libnm-glib-aux/nm-value-type.h @@ -7,6 +7,7 @@ #define __NM_VALUE_TYPE_H__ typedef enum _nm_packed { + NM_VALUE_TYPE_NONE = 0, NM_VALUE_TYPE_UNSPEC = 1, NM_VALUE_TYPE_BOOL = 2, NM_VALUE_TYPE_INT32 = 3, @@ -90,6 +91,7 @@ nm_value_type_cmp(NMValueType value_type, gconstpointer p_a, gconstpointer p_b) return 0; case NM_VALUE_TYPE_STRING: return nm_strcmp0(*((const char *const *) p_a), *((const char *const *) p_b)); + case NM_VALUE_TYPE_NONE: case NM_VALUE_TYPE_UNSPEC: break; } @@ -129,6 +131,7 @@ nm_value_type_copy(NMValueType value_type, gpointer dst, gconstpointer src) *((char **) dst) = g_strdup(*((const char *const *) src)); } return; + case NM_VALUE_TYPE_NONE: case NM_VALUE_TYPE_UNSPEC: break; } @@ -169,6 +172,7 @@ nm_value_type_get_from_variant(NMValueType value_type, * clear how many bits we would need. */ /* fall-through */ + case NM_VALUE_TYPE_NONE: case NM_VALUE_TYPE_UNSPEC: break; } @@ -198,6 +202,7 @@ nm_value_type_to_variant(NMValueType value_type, gconstpointer src) * clear how many bits we would need. */ /* fall-through */ + case NM_VALUE_TYPE_NONE: case NM_VALUE_TYPE_UNSPEC: break; } @@ -225,6 +230,7 @@ nm_value_type_get_variant_type(NMValueType value_type) * clear how many bits we would need. */ /* fall-through */ + case NM_VALUE_TYPE_NONE: case NM_VALUE_TYPE_UNSPEC: break; }