Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools: fix compiling vwhere with -cc gcc -cstrict #21347

Merged
merged 1 commit into from
Apr 25, 2024
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 cmd/tools/vwhere/finder_utils.v
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ fn invalid_option(invalid ParamOption, arg string) {

fn valid_args_quantity_or_show_help(args []string) {
if true in [
args.len < 1,
(args.len < 1),
Copy link
Member

Choose a reason for hiding this comment

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

Imho that is a general problem with cgen imho:

/tmp/v_1000/vwhere.01HW9N7XJ6BZ847VS6F5VJX8A1.tmp.c:22575:23: error: suggest parentheses around comparison in operand of ‘==’ [-Werror=parentheses]
22575 |  if (true == args.len < 1 || true == (Array_string_co...
      |              ~~~~~~~~~^~~

Good find.

'-help' in args,
'--help' in args,
args == ['help'],
Expand Down
Loading