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

Conversation

ttytm
Copy link
Member

@ttytm ttytm commented Apr 25, 2024

fixes:

v -cc gcc -cstrict cmd/tools/vwhere

@@ -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.

@spytheman spytheman merged commit 9f788de into vlang:master Apr 25, 2024
44 of 45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants