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

raster/raster3d: Initialize Cell_head structure contents before using it in r3.in.lidar, r.in.lidar, r.in.pdal, r.in.xyz #4390

Merged
merged 1 commit into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions raster/r.in.lidar/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ int main(int argc, char *argv[])
struct PointBinning point_binning;
void *base_array;
void *raster_row;
struct Cell_head region;
struct Cell_head input_region;
struct Cell_head region = {0};
struct Cell_head input_region = {0};
int rows, last_rows, row0, cols; /* scan box size */
int row; /* counters */

Expand Down Expand Up @@ -100,7 +100,7 @@ int main(int argc, char *argv[])
int return_filter;

const char *projstr;
struct Cell_head cellhd, loc_wind;
struct Cell_head cellhd = {0}, loc_wind = {0};

unsigned int n_filtered;

Expand Down
6 changes: 3 additions & 3 deletions raster/r.in.pdal/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ int main(int argc, char *argv[])
SEGMENT base_segment;
struct PointBinning point_binning;
void *raster_row;
struct Cell_head region;
struct Cell_head input_region;
struct Cell_head region = {};
struct Cell_head input_region = {};
int rows, cols; /* scan box size */

char buff[BUFFSIZE];
Expand All @@ -81,7 +81,7 @@ int main(int argc, char *argv[])
bin_index_nodes.max_nodes = 0;
bin_index_nodes.nodes = NULL;

struct Cell_head loc_wind;
struct Cell_head loc_wind = {};

G_gisinit(argv[0]);

Expand Down
2 changes: 1 addition & 1 deletion raster/r.in.xyz/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ int main(int argc, char *argv[])
char *n_array, *min_array, *max_array, *sum_array, *sumsq_array,
*index_array;
void *raster_row, *ptr;
struct Cell_head region;
struct Cell_head region = {0};
int rows, last_rows, row0, cols; /* scan box size */
int row, col; /* counters */

Expand Down
7 changes: 3 additions & 4 deletions raster3d/r3.in.lidar/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,13 +361,12 @@ int main(int argc, char *argv[])

/* for the CRS info */
const char *projstr;
struct Cell_head current_region;
struct Cell_head file_region;

struct Cell_head current_region = {0};
struct Cell_head file_region = {0};
G_get_set_window(&current_region);

/* extent for all data */
struct Cell_head data_region;
struct Cell_head data_region = {0};

long unsigned header_count = 0;
int i;
Expand Down
Loading