Avoid compiler warnings due to extended enums.
authorTobias Brunner <tobias@strongswan.org>
Mon, 21 Nov 2011 10:05:43 +0000 (11:05 +0100)
committerTobias Brunner <tobias@strongswan.org>
Tue, 20 Mar 2012 16:30:45 +0000 (17:30 +0100)
src/libcharon/encoding/generator.c
src/libcharon/encoding/parser.c

index a378426..c681929 100644 (file)
@@ -423,7 +423,7 @@ METHOD(generator_t, generate_payload, void,
        {
                DBG2(DBG_ENC, "  generating rule %d %N",
                         i, encoding_type_names, rules[i].type);
-               switch (rules[i].type)
+               switch ((int)rules[i].type)
                {
                        case U_INT_4:
                        case U_INT_8:
index 39ce2db..1a7f297 100644 (file)
@@ -390,7 +390,7 @@ METHOD(parser_t, parse_payload, status_t,
                rule = &(this->rules[rule_number]);
                DBG2(DBG_ENC, "  parsing rule %d %N",
                         rule_number, encoding_type_names, rule->type);
-               switch (rule->type)
+               switch ((int)rule->type)
                {
                        case U_INT_4:
                        {