diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2019-03-05 15:57:50 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2019-03-05 15:57:50 -0800 |
commit | 01569b8f5f2394c534c3aba7276caf22493fce82 (patch) | |
tree | 40d52cf2d4d76c1e1e5bf6443c34836627f4e5f9 /src/phys/place/place_bin.c | |
parent | b632c8496cc48bb8be0851ea2c183f94c201f791 (diff) | |
download | abc-01569b8f5f2394c534c3aba7276caf22493fce82.tar.gz abc-01569b8f5f2394c534c3aba7276caf22493fce82.tar.bz2 abc-01569b8f5f2394c534c3aba7276caf22493fce82.zip |
Fixing some warnings by adding cast from 'int' to 'size_t' in memset, memcpy, etc.
Diffstat (limited to 'src/phys/place/place_bin.c')
-rw-r--r-- | src/phys/place/place_bin.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/phys/place/place_bin.c b/src/phys/place/place_bin.c index 92b283cc..01bcf461 100644 --- a/src/phys/place/place_bin.c +++ b/src/phys/place/place_bin.c @@ -82,7 +82,7 @@ void spreadDensityX(int numBins, float maxMovement) { } // spread X - qsort(allCells, moveableCells, sizeof(ConcreteCell*), cellSortByY); + qsort(allCells, (size_t)moveableCells, sizeof(ConcreteCell*), cellSortByY); y = 0; @@ -96,7 +96,7 @@ void spreadDensityX(int numBins, float maxMovement) { // have we filled up a y-bin? if (yCumArea >= totalArea*(y+1)/numBins && yBinArea > 0) { memcpy(binCells, &(allCells[yBinStart]), sizeof(ConcreteCell*)*yBinCount); - qsort(binCells, yBinCount, sizeof(ConcreteCell*), cellSortByX); + qsort(binCells, (size_t)yBinCount, sizeof(ConcreteCell*), cellSortByX); #if defined(DEBUG) printf("y-bin %d count=%d area=%f\n",y,yBinCount, yBinArea); @@ -217,7 +217,7 @@ void spreadDensityY(int numBins, float maxMovement) { // have we filled up an x-bin? if (xCumArea >= totalArea*(x+1)/numBins && xBinArea > 0) { memcpy(binCells, &(allCells[xBinStart]), sizeof(ConcreteCell*)*xBinCount); - qsort(binCells, xBinCount, sizeof(ConcreteCell*), cellSortByY); + qsort(binCells, (size_t)xBinCount, sizeof(ConcreteCell*), cellSortByY); // printf("x-bin %d count=%d area=%f\n",y,yBinCount, yBinArea); |