Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 02a9525

Browse files
committedNov 13, 2023
fixed some bugs
1 parent 3efccef commit 02a9525

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed
 

‎cbuild.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ def git(*git_argv) -> subprocess.CompletedProcess[bytes]:
263263
for submod in result.submodules:
264264
MOD_CACHE[result.import_path + "/" + submod] = result.get_submodule(submod)
265265
if currentmod == import_path:
266-
self.dependencies.add(result)
266+
self.dependencies.add(result.import_path)
267267
# we imported the root module
268268
return result
269269

@@ -276,7 +276,7 @@ def git(*git_argv) -> subprocess.CompletedProcess[bytes]:
276276
)
277277

278278
result = result.get_submodule(submodname)
279-
self.dependencies.add(result)
279+
self.dependencies.add(result.import_path)
280280
return result
281281

282282
@staticmethod
@@ -490,6 +490,14 @@ def build(mod: Module, type: Literal["exe", "lib"]):
490490
f"--include={mod.h()}",
491491
# TODO: remove if release flag is present.
492492
"-fsanitize=address,undefined",
493+
"-Wall",
494+
"-Wextra",
495+
"-Werror=conversion",
496+
"-Werror=shadow",
497+
"-Wno-sign-conversion", # so uint - 1 doesn't warn of conversion
498+
"-fasynchronous-unwind-tables", # so _Unwind_* always works.
499+
"-Werror=format-security",
500+
"-Werror=implicit-function-declaration",
493501
"-g3",
494502
]
495503
if type == "lib":

‎modfile/modfile.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ modfile_parse(Arena* mem, Arena scratch, char* path)
9595
&platform_flags,
9696
str_format(mem, "%s", parts.data[1]));
9797
for (size_t j = 2; j < parts.len; j += 1) {
98-
char* tmp = str_format(
98+
char* tmp_flag = str_format(
9999
mem, "%s", parts.data[j]);
100-
*slice_push(mem, flags) = tmp;
100+
*slice_push(mem, flags) = tmp_flag;
101101
}
102102

103103
continue;

0 commit comments

Comments
 (0)
Please sign in to comment.