common: cast arguments to character classification functions to unsigned char
[babeltrace.git] / src / plugins / ctf / fs-sink / translate-trace-ir-to-ctf-ir.c
index d1e969f8db0eda36956208b373026b9cdcc40744..e0a03b2e8be3d02c867e7863f7a8f908d86c8a0c 100644 (file)
@@ -154,14 +154,14 @@ bool ist_valid_identifier(const char *name)
        }
 
        /* Make sure the name starts with a letter or `_` */
-       if (!isalpha(name[0]) && name[0] != '_') {
+       if (!isalpha((unsigned char) name[0]) && name[0] != '_') {
                ist_valid = false;
                goto end;
        }
 
        /* Make sure the name only contains letters, digits, and `_` */
        for (at = name; *at != '\0'; at++) {
-               if (!isalnum(*at) && *at != '_') {
+               if (!isalnum((unsigned char) *at) && *at != '_') {
                        ist_valid = false;
                        goto end;
                }
@@ -307,7 +307,7 @@ int create_relative_field_ref(struct ctx *ctx,
                tgt_fc = ctx->cur_ec->payload_fc;
                break;
        default:
-               abort();
+               bt_common_abort();
        }
 
        i = 0;
@@ -355,7 +355,7 @@ int create_relative_field_ref(struct ctx *ctx,
                        break;
                }
                default:
-                       abort();
+                       bt_common_abort();
                }
 
                if (named_fc) {
@@ -479,7 +479,7 @@ int create_absolute_field_ref(struct ctx *ctx,
                g_string_assign(tgt_field_ref, "event.fields");
                break;
        default:
-               abort();
+               bt_common_abort();
        }
 
        BT_ASSERT(fc);
@@ -513,7 +513,7 @@ int create_absolute_field_ref(struct ctx *ctx,
                                bt_field_path_item_index_get_index(fp_item));
                        break;
                default:
-                       abort();
+                       bt_common_abort();
                }
 
                BT_ASSERT(named_fc);
@@ -633,7 +633,7 @@ void append_to_parent_field_class(struct ctx *ctx,
                break;
        }
        default:
-               abort();
+               bt_common_abort();
        }
 }
 
@@ -1337,7 +1337,7 @@ int translate_field_class(struct ctx *ctx)
                        BT_FIELD_CLASS_TYPE_VARIANT)) {
                ret = translate_variant_field_class(ctx);
        } else {
-               abort();
+               bt_common_abort();
        }
 
        return ret;
@@ -1407,7 +1407,7 @@ int set_field_ref(struct fs_sink_ctf_field_class *fc, const char *fc_name,
                break;
        }
        default:
-               abort();
+               bt_common_abort();
        }
 
        BT_ASSERT(field_ref);
This page took 0.025421 seconds and 4 git commands to generate.