Skip to content

Commit

Permalink
Fix compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-Romain committed Sep 3, 2024
1 parent 482a648 commit fb498c9
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/LASRstages/info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ bool LASRinfo::process(LASheader*& h)

int nextrabytes = 0;
const char* name_table[10] = { "unsigned char", "char", "unsigned short", "short", "unsigned long", "long", "unsigned long long", "long long", "float", "double" };
for (int i = 0 ; i < h->number_of_variable_length_records ; i++)
for (unsigned int i = 0 ; i < h->number_of_extended_variable_length_records ; i++)
{
LASvlr vlr = h->vlrs[i];

Expand Down
8 changes: 4 additions & 4 deletions src/LASRstages/ivf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ bool LASRivf::process(LAS*& las)
rymax = ROUNDANY(rymax + 0.5 * res, res);
rzmax = ROUNDANY(rzmax + 0.5 * res, res);

size_t length = (rxmax - rxmin) / res;
size_t width = (rymax - rymin) / res;
size_t height = (rzmax - rzmin) / res;
size_t nvoxels = length*width*height;
int length = (rxmax - rxmin) / res;
int width = (rymax - rymin) / res;
int height = (rzmax - rzmin) / res;
size_t nvoxels = (size_t)length*(size_t)width*(size_t)height;

if (!force_map && nvoxels < INT_MAX/sizeof(int)) // 256 MB
{
Expand Down
2 changes: 1 addition & 1 deletion src/LASRstages/localmaximum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ bool LASRlocalmaximum::process(LAS*& las)
bool main_thread = omp_get_thread_num() == 0;

#pragma omp parallel for num_threads(ncpu)
for (auto i = 0 ; i < las->npoints ; ++i)
for (size_t i = 0 ; i < las->npoints ; ++i)
{
if (progress->interrupted()) continue;

Expand Down
2 changes: 1 addition & 1 deletion src/LASRstages/nnmetrics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ bool LASRnnmetrics::process(LAS*& las)
lm.resize(maxima.size());

#pragma omp parallel for num_threads(ncpu) firstprivate(metrics)
for (int i = 0 ; i < maxima.size() ; i++)
for (size_t i = 0 ; i < maxima.size() ; i++)
{
if (progress->interrupted()) continue;

Expand Down
2 changes: 1 addition & 1 deletion src/LASRstages/svd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ bool LASRsvd::process(LAS*& las)
bool main_thread = omp_get_thread_num() == 0;

#pragma omp parallel for num_threads(ncpu)
for (int i = 0 ; i < las->npoints ; i++)
for (size_t i = 0 ; i < las->npoints ; i++)
{
if (progress->interrupted()) continue;

Expand Down

0 comments on commit fb498c9

Please sign in to comment.