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

colexec, coldata: fix compiler warnings in template files #47953

Merged
merged 1 commit into from
Apr 28, 2020

Conversation

yuzefovich
Copy link
Member

This commit fixes all compiler warnings that I see in Goland. To get
there it does the following:

  1. renames Vec._TemplateType to Vec.TemplateType so that the method
    is considered exported
  2. pulls out declaration of local variables outside of templated if
    blocks
  3. breaks up the chained function call to parse flags in pkg/workload
    and a few other places so that there is an allocation of a struct and we
    can call a method on it that has a pointer receiver. It shouldn't matter
    for the performance though.

Release note: None

@yuzefovich yuzefovich requested review from asubiotto and a team April 23, 2020 03:50
@cockroach-teamcity
Copy link
Member

This change is Reviewable

This commit fixes all compiler warnings that I see in Goland. To get
there it does the following:
1. renames `Vec._TemplateType` to `Vec.TemplateType` so that the method
is considered exported
2. pulls out declaration of local variables outside of templated `if`
blocks
3. breaks up the chained function call to parse flags in `pkg/workload`
and a few other places so that there is an allocation of a struct and we
can call a method on it that has a pointer receiver. It shouldn't matter
for the performance though.

Release note: None
@yuzefovich yuzefovich force-pushed the fix-compiler-warnings branch from be55feb to 0b2fd2b Compare April 27, 2020 17:20
@blathers-crl
Copy link

blathers-crl bot commented Apr 27, 2020

❌ The GitHub CI (Cockroach) build has failed on 0b2fd2ba.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.

Copy link
Contributor

@asubiotto asubiotto left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 8 of 38 files at r1.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @asubiotto)

@yuzefovich
Copy link
Member Author

TFTR!

bors r+

@craig
Copy link
Contributor

craig bot commented Apr 28, 2020

Build succeeded

@craig craig bot merged commit 211abed into cockroachdb:master Apr 28, 2020
@yuzefovich yuzefovich deleted the fix-compiler-warnings branch April 28, 2020 14:55
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.

3 participants