diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-08-31 17:07:52 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-08-31 17:07:52 +0900 |
| commit | 7bbfa1e32537ea0c5e98c0dbb5f77f7bf342118b (patch) | |
| tree | 43f46ccc3f2610b342672a55fec82ab7dd74cff5 /src/preprocess.c | |
| parent | 8ac323ccf3e7c012912d8f333abf267e32628a0f (diff) | |
| download | ducc-7bbfa1e32537ea0c5e98c0dbb5f77f7bf342118b.tar.gz ducc-7bbfa1e32537ea0c5e98c0dbb5f77f7bf342118b.tar.zst ducc-7bbfa1e32537ea0c5e98c0dbb5f77f7bf342118b.zip | |
feat: support cast expression (any types can be coerced to any types for now)
Diffstat (limited to 'src/preprocess.c')
| -rw-r--r-- | src/preprocess.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/preprocess.c b/src/preprocess.c index b1753c2..e471b1f 100644 --- a/src/preprocess.c +++ b/src/preprocess.c @@ -690,12 +690,12 @@ static const char* resolve_include_name(Preprocessor* pp, const Token* include_n char* current_filename = strdup(include_name_token->loc.filename); const char* current_dir = dirname(current_filename); char* buf = calloc(strlen(include_name) - 2 + 1 + strlen(current_dir) + 1, sizeof(char)); - sprintf(buf, "%s/%.*s", current_dir, INT_CAST strlen(include_name) - 2, include_name + 1); + sprintf(buf, "%s/%.*s", current_dir, (int)(strlen(include_name) - 2), include_name + 1); return buf; } else { for (int i = 0; i < pp->n_include_paths; ++i) { char* buf = calloc(strlen(include_name) - 2 + 1 + strlen(pp->include_paths[i]) + 1, sizeof(char)); - sprintf(buf, "%s/%.*s", pp->include_paths[i], INT_CAST strlen(include_name) - 2, include_name + 1); + sprintf(buf, "%s/%.*s", pp->include_paths[i], (int)(strlen(include_name) - 2), include_name + 1); if (access(buf, F_OK | R_OK) == 0) { return buf; } |
