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

r3.info: Fix uninitialized variable warnings for strings #4006

Merged
merged 1 commit into from
Jul 9, 2024

Conversation

ShubhamDesai
Copy link
Contributor

This pull request addresses the following warning identified by cppcheck.

Issue:
main.c:203:47: error: Uninitialized variable: tmp1 [uninitvar]
"raster_3d", cats_ok ? tmp1 : "??") > 0)

Changes made:
The issue was fixed by initializing the variables tmp1, tmp2, and tmp3 as empty strings. This ensures that the variables have defined values before they are used in the calculation.

@github-actions github-actions bot added C Related code is in C module raster3d labels Jul 9, 2024
@marisn marisn merged commit 87b6ac0 into OSGeo:main Jul 9, 2024
26 checks passed
@neteler neteler added this to the 8.5.0 milestone Jul 9, 2024
a0x8o pushed a commit to a0x8o/grass that referenced this pull request Jul 23, 2024
@wenzeslaus wenzeslaus changed the title raster3d: Fix uninitialized variable issue in main.c r3.info: Fix uninitialized variable warnings for strings Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C Related code is in C module raster3d
Projects
Development

Successfully merging this pull request may close these issues.

4 participants