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 6d32cb193e19c11742e8be61be688f149d8467ed..e0a03b2e8be3d02c867e7863f7a8f908d86c8a0c 100644 (file)
@@ -25,6 +25,8 @@
 #define BT_LOG_TAG "PLUGIN/SINK.CTF.FS/TRANSLATE-TRACE-IR-TO-CTF-IR"
 #include "logging/comp-logging.h"
 
+#include "translate-trace-ir-to-ctf-ir.h"
+
 #include <babeltrace2/babeltrace.h>
 #include "common/macros.h"
 #include "common/common.h"
@@ -152,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;
                }
@@ -305,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;
@@ -353,7 +355,7 @@ int create_relative_field_ref(struct ctx *ctx,
                        break;
                }
                default:
-                       abort();
+                       bt_common_abort();
                }
 
                if (named_fc) {
@@ -477,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);
@@ -511,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);
@@ -631,7 +633,7 @@ void append_to_parent_field_class(struct ctx *ctx,
                break;
        }
        default:
-               abort();
+               bt_common_abort();
        }
 }
 
@@ -1335,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;
@@ -1405,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);
@@ -1692,6 +1694,7 @@ end:
        return ret;
 }
 
+static
 bool default_clock_class_name_exists(struct fs_sink_ctf_trace *trace,
                const char *name)
 {
This page took 0.027072 seconds and 4 git commands to generate.