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

Fix maybe uniniatilzed access of variable #709

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

reshke
Copy link
Contributor

@reshke reshke commented Nov 14, 2024

tag.c: In function ‘AddTagDescriptions’:
tag.c:507:20: error: ‘value_cell’ may be used uninitialized [-Werror=maybe-uninitialized]
  507 |                 if (value_cell || isnull)
      |                    ^
tag.c:473:34: note: ‘value_cell’ was declared here
  473 |                 ListCell        *value_cell;
      |                                  ^~~~~~~~~~
cc1: all warnings being treated as errors

Change logs

Describe your change clearly, including what problem is being solved or what feature is being added.

If it has some breaking backward or forward compatibility, please clary.

Why are the changes needed?

Describe why the changes are necessary.

Does this PR introduce any user-facing change?

If yes, please clarify the previous behavior and the change this PR proposes.

How was this patch tested?

Please detail how the changes were tested, including manual tests and any relevant unit or integration tests.

Contributor's Checklist

Here are some reminders and checklists before/when submitting your pull request, please check them:

  • Make sure your Pull Request has a clear title and commit message. You can take git-commit template as a reference.
  • Sign the Contributor License Agreement as prompted for your first-time contribution(One-time setup).
  • Learn the coding contribution guide, including our code conventions, workflow and more.
  • List your communication in the GitHub Issues or Discussions (if has or needed).
  • Document changes.
  • Add tests for the change
  • Pass make installcheck
  • Pass make -C src/test installcheck-cbdb-parallel
  • Feel free to request cloudberrydb/dev team for review and approval when your PR is ready🥳

@yjhjstz
Copy link
Member

yjhjstz commented Nov 15, 2024

@wenchaozhang-123 help take a look.

@reshke reshke changed the title Fix maybe uniniatilzed access of variables Fix maybe uniniatilzed access of variable Nov 15, 2024
@reshke
Copy link
Contributor Author

reshke commented Nov 17, 2024

I don't understand why CI fails

@tuhaihe
Copy link
Member

tuhaihe commented Nov 17, 2024

I don't understand why CI fails

Hi @reshke the CI is still in the process of restoration. Be patient to wait for a few days.

@wenchaozhang-123
Copy link
Contributor

Please squash the commits to one.

@tuhaihe
Copy link
Member

tuhaihe commented Nov 20, 2024

I don't understand why CI fails

Hi @reshke the CI is still in the process of restoration. Be patient to wait for a few days.

Hi @reshke now welcome to try to force push again, then should can trigger the new CI checks.

@reshke
Copy link
Contributor Author

reshke commented Nov 20, 2024

Some problems with build template


Error: The template is not valid. .github/workflows/build-cloudberry.yml (Line: 190, Col: 19): Unexpected value '',.github/workflows/build-cloudberry.yml (Line: 191, Col: 19): Unexpected value ''

@reshke
Copy link
Contributor Author

reshke commented Nov 20, 2024

Some problems with build template


Error: The template is not valid. .github/workflows/build-cloudberry.yml (Line: 190, Col: 19): Unexpected value '',.github/workflows/build-cloudberry.yml (Line: 191, Col: 19): Unexpected value ''

looks like env.DOCKERHUB_USER/env.DOCKERHUB_TOKEN substitution fails.

@edespino
Copy link
Contributor

Sorry for the inconvenience. I have a PR in flight which will remove the secrets dependency and unblock the builds.

#719

@edespino
Copy link
Contributor

If I could get a review of #719, it will help getting builds unblocked.

@reshke
Copy link
Contributor Author

reshke commented Nov 25, 2024

Can anyone please approve this? I appreciate @wenchaozhang-123 review, but this approve is grey, not green

@@ -471,7 +471,8 @@ AddTagDescriptions(List *tags,
bool isnull;
List *allowed_values;
ListCell *value_cell;


value_cell = NULL;
Copy link
Contributor

Choose a reason for hiding this comment

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

I prefer not to check the value of value_cell after the loop ends. It looks a black macro that the cell value is not necessarily null after the loop normally ends. It will be more robust to use a flag here.

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.

7 participants