Skip to content
Merged
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 sys/src/ape/9src/cc.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ main(int argc, char *argv[])
suf++;
if(strcmp(suf, "c") == 0) {
append(&srcs, s);
append(&objs, changeext(s, "o"));
append(&objs, changeext(s, objext));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The use of objext here is inconsistent with the check on line 173, which uses ot->o to recognize existing object files. If objext and ot->o are intended to represent the same architecture-specific extension, it would be better to use a single variable consistently. If they can differ, this change might cause files with the objext extension passed on the command line to be ignored by the recognition logic in the else if block, while still allowing .o files which may no longer be appropriate for the target architecture.

} else if(strcmp(suf, "o") == 0 ||
strcmp(suf, ot->o) == 0 ||
strcmp(suf, "a") == 0 ||
Expand Down
Loading