Merge pull request #361 from alliedmodders/compile-fixups

Compile fixups for Clang 3.8
This commit is contained in:
Vincent Herbet 2016-03-20 22:36:56 +01:00
commit fdebeab612
3 changed files with 5 additions and 5 deletions

View File

@ -1456,7 +1456,7 @@ static void setconstants(void)
#endif
add_constant("charbits",sCHARBITS,sGLOBAL,0);
add_constant("charmin",0,sGLOBAL,0);
add_constant("charmax",~(-1 << sCHARBITS) - 1,sGLOBAL,0);
add_constant("charmax",~(-1UL << sCHARBITS) - 1,sGLOBAL,0);
add_constant("ucharmax",(1 << (sizeof(cell)-1)*8)-1,sGLOBAL,0);
add_constant("__Pawn",VERSION_INT,sGLOBAL,0);

View File

@ -375,11 +375,11 @@ static int skim(int *opstr,void (*testfunc)(int),int dropval,int endval,
} /* if */
dropout(lvalue,testfunc,droplab,lval);
if (!lvalue && sc_intest && (lval->ident==iARRAY || lval->ident==iREFARRAY)) {
error(33, lval->sym ? (lval->sym->name ? lval->sym->name : "-unknown") : "-unknown-"); /* array was not indexed in an expression */
error(33, lval->sym ? lval->sym->name : "-unknown-"); /* array was not indexed in an expression */
}
} else if (hits) { /* no (more) identical operators */
if (!lvalue && sc_intest && (lval->ident==iARRAY || lval->ident==iREFARRAY)) {
error(33, lval->sym ? (lval->sym->name ? lval->sym->name : "-unknown") : "-unknown-"); /* array was not indexed in an expression */
error(33, lval->sym ? lval->sym->name : "-unknown-"); /* array was not indexed in an expression */
}
dropout(lvalue,testfunc,droplab,lval); /* found at least one operator! */
ldconst(endval,sPRI);
@ -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;

View File

@ -1504,7 +1504,7 @@ z_streamp strm;
{
struct inflate_state FAR *state;
if (strm == Z_NULL || strm->state == Z_NULL) return -1L << 16;
if (strm == Z_NULL || strm->state == Z_NULL) return -1UL << 16;
state = (struct inflate_state FAR *)strm->state;
return ((long)(state->back) << 16) +
(state->mode == COPY ? state->length :