This patch fixes compiler warnings like the following:
./lib/ovsdb-types.h:171:5: error: comparison of unsigned expression
>= 0 is always true [-Werror=type-limits]
return NULL;
}
- if ((value->type >= 0 && value->type < JSON_N_TYPES
+ if (((int) value->type >= 0 && value->type < JSON_N_TYPES
&& types & (1u << value->type))
|| (types & OP_ID && value->type == JSON_STRING
&& ovsdb_parser_is_id(value->u.string)))
static inline bool
ovsdb_atomic_type_is_valid(enum ovsdb_atomic_type atomic_type)
{
- return atomic_type >= 0 && atomic_type < OVSDB_N_TYPES;
+ return (int) atomic_type >= 0 && atomic_type < OVSDB_N_TYPES;
}
static inline bool