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

Uninitialized member in government struct #1178

Closed
psampathkumar opened this issue Aug 1, 2022 · 0 comments · Fixed by #1193
Closed

Uninitialized member in government struct #1178

psampathkumar opened this issue Aug 1, 2022 · 0 comments · Fixed by #1193
Assignees
Labels
bug Something isn't working

Comments

@psampathkumar
Copy link
Contributor

Describe the bug
Reported by coverity

1 new defect(s) introduced to longturn/freeciv21 found with Coverity Scan.

New defect(s) Reported-by: Coverity Scan
Showing 1 of 1 defect(s)

** CID 1490876: Uninitialized members (UNINIT_CTOR)
/common/government.cpp: 414 in government::government()()


*** CID 1490876: Uninitialized members (UNINIT_CTOR)
/common/government.cpp: 414 in government::government()()
408 {
409 item_number = 0;
410 ruler_titles = new QHash<const struct nation_type *, struct ruler_title *>;
411 requirement_vector_init(&reqs);
412 changed_to_times = 0;
413 ruledit_disabled = false;

CID 1490876:  Uninitialized members  (UNINIT_CTOR)
Non-static class member "ai.better" is not initialized in this constructor nor in any functions that it calls.

414 }
415
416 /**
417 De-allocate resources associated with the given government.
418 */
419 government::~government()

Platform and version (please complete the following information):

  • master
@psampathkumar psampathkumar added the bug Something isn't working label Aug 1, 2022
@psampathkumar psampathkumar self-assigned this Aug 1, 2022
psampathkumar added a commit to psampathkumar/freeciv21 that referenced this issue Aug 4, 2022
@jwrober jwrober closed this as completed in 850cc46 Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant