Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/codegen/codegen_backend_lisp.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ static void lisp_get_struct_field_info(ParserContext *ctx, const char *type_str,
{
sname += 7;
}
char *star = strchr(sname, '*');
char *star = (char *)strchr(sname, '*');
if (star)
{
*star = '\0';
Expand Down
2 changes: 1 addition & 1 deletion src/codegen/codegen_shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ char *strip_template_suffix(const char *name)
{
return NULL;
}
char *lt = strchr(name, '<');
const char *lt = strchr(name, '<');
if (lt)
{
ptrdiff_t len = lt - name;
Expand Down
6 changes: 3 additions & 3 deletions src/codegen/codegen_stmt_match.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
static void emit_single_pattern_cond(ParserContext *ctx, const char *pat, int id, int is_ptr)
{
// Check for range pattern: "start..end" or "start..=end"
char *range_incl = strstr(pat, "..=");
char *range_excl = strstr(pat, "..");
const char *range_incl = strstr(pat, "..=");
const char *range_excl = strstr(pat, "..");

if (range_incl)
{
Expand Down Expand Up @@ -465,7 +465,7 @@ void codegen_match_internal(ParserContext *ctx, ASTNode *node, int use_result)
}
else
{
char *v = strstr(c->match_case.pattern, "::");
char *v = (char *)strstr(c->match_case.pattern, "::");
if (v)
{
v += 2;
Expand Down
4 changes: 2 additions & 2 deletions src/codegen/codegen_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ static void emit_c_decl(ParserContext *ctx, const char *type_str, const char *na
else if (generic && (!bracket || generic < bracket))
{
char mangled_candidate[MAX_MANGLED_NAME_LEN];
char *gt = strchr(generic, '>');
char *gt = (char *)strchr(generic, '>');
int success = 0;

if (gt)
Expand Down Expand Up @@ -242,7 +242,7 @@ void emit_func_signature(ParserContext *ctx, ASTNode *func, const char *name_ove
ret_str = xstrdup("void");
}

char *fn_ptr = strstr(ret_str, "(*)");
char *fn_ptr = (char *)strstr(ret_str, "(*)");

if (fn_ptr)
{
Expand Down
4 changes: 2 additions & 2 deletions src/platform/os.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ static inline int z_is_abs_path(const char *p)

static inline char *z_path_last_sep(const char *path)
{
char *last_slash = strrchr(path, '/');
char *last_slash = (char *)strrchr(path, '/');
#if ZC_OS_WINDOWS
char *last_bs = strrchr(path, '\\');
char *last_bs = (char *)strrchr(path, '\\');
if (last_bs > last_slash)
{
return last_bs;
Expand Down
2 changes: 1 addition & 1 deletion src/utils/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ static void maybe_lock_std_root(CompilerConfig *cfg, const char *resolved)
{
return;
}
char *std_pos = strstr(resolved, "/std/");
const char *std_pos = strstr(resolved, "/std/");
if (!std_pos)
{
return;
Expand Down
Loading