Fix shift-negative-value warning on newer compiler versions.

error: shifting a negative signed value is undefined
This commit is contained in:
Nicholas Hastings
2016-03-17 15:12:26 -04:00
parent 19dd940b22
commit 79a6dc9501
3 changed files with 3 additions and 3 deletions

View File

@ -749,7 +749,7 @@ static int hier14(value *lval1)
* negative value would do).
*/
for (i=0; i<sDIMEN_MAX; i++)
arrayidx1[i]=arrayidx2[i]=(cell)(-1L << (sizeof(cell)*8-1));
arrayidx1[i]=arrayidx2[i]=(cell)(-1UL << (sizeof(cell)*8-1));
org_arrayidx=lval1->arrayidx; /* save current pointer, to reset later */
if (lval1->arrayidx==NULL)
lval1->arrayidx=arrayidx1;