Skip to content

Commit

Permalink
Merge pull request #3290 from rouault/fix_3233
Browse files Browse the repository at this point in the history
Remove unused variable assignments (fixes #3233)
  • Loading branch information
rouault authored Dec 15, 2020
2 parents 3c2a318 + 044a11e commit c375f75
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 19 deletions.
2 changes: 1 addition & 1 deletion gdal/alg/internal_libqhull/merge.c
Original file line number Diff line number Diff line change
Expand Up @@ -1148,7 +1148,7 @@ void qh_getmergeset(facetT *facetlist) {
ridgeT *ridge, **ridgep;
int nummerges;

nummerges= qh_setsize(qh facet_mergeset);
/* nummerges= qh_setsize(qh facet_mergeset); */
trace4((qh ferr, 4026, "qh_getmergeset: started.\n"));
qh visit_id++;
FORALLfacet_(facetlist) {
Expand Down
5 changes: 3 additions & 2 deletions gdal/frmts/aigrid/aigccitt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1539,8 +1539,9 @@ typedef struct {
sp->bit = BitsAvail; \
sp->data = BitAcc; \
sp->EOLcnt = EOLcnt; \
rawcc -= (int)((unsigned char *) cp - rawcp); \
rawcp = (unsigned char *) cp; \
/* below updates not needed in AIG case */ \
/* rawcc -= (int)((unsigned char *) cp - rawcp); */ \
/* rawcp = (unsigned char *) cp; */ \
} while (0)

/*
Expand Down
2 changes: 1 addition & 1 deletion gdal/frmts/grib/degrib/g2clib/reduce.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
/* NO SPLITS OR NEW BOXES. */
goto L190;
} else {
novl = nov[l];
// novl = nov[l];

m = (nov[l] - 1) / (ibxx2[j] - 1) + 1;
/* M IS FOUND BY SOLVING THE EQUATION BELOW FOR M: */
Expand Down
21 changes: 6 additions & 15 deletions gdal/ogr/ogrsf_frmts/geojson/ogrgeojsonreader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2705,23 +2705,14 @@ lh_entry* OGRGeoJSONFindMemberEntryByName( json_object* poObj,
if( nullptr == pszName || nullptr == poObj)
return nullptr;

json_object* poTmp = poObj;

json_object_iter it;
it.key = nullptr;
it.val = nullptr;
it.entry = nullptr;
if( nullptr != json_object_get_object(poTmp) &&
nullptr != json_object_get_object(poTmp)->head )
if( nullptr != json_object_get_object(poObj) )
{
it.entry = json_object_get_object(poTmp)->head;
while( it.entry != nullptr )
lh_entry* entry = json_object_get_object(poObj)->head;
while( entry != nullptr )
{
it.key = (char*)it.entry->k;
it.val = (json_object*)it.entry->v;
if( EQUAL( it.key, pszName ) )
return it.entry;
it.entry = it.entry->next;
if( EQUAL( static_cast<const char*>(entry->k), pszName ) )
return entry;
entry = entry->next;
}
}

Expand Down
1 change: 1 addition & 0 deletions gdal/port/cpl_cpu_features.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ static bool CPLDetectRuntimeAVX()
{
return false;
}
CPL_IGNORE_RET_VAL(nXCRHigh); // unused

return true;
}
Expand Down

0 comments on commit c375f75

Please sign in to comment.