Commit 61de10fe authored by slevy's avatar slevy
Browse files

Fix a bunch of lint pointed out by macos clang compiler.

parent 3f254e0e
......@@ -16,6 +16,9 @@ static char copyright[] = "Copyright (c) 2002 NCSA, University of Illinois Urban
/*
* $Log$
* Revision 1.133 2017/08/01 21:56:08 slevy
* Fix a bunch of lint pointed out by macos clang compiler.
*
* Revision 1.132 2017/08/01 21:13:54 slevy
* Use GL_LINE_STRIP rather than GL_LINE_LOOP when drawing an ellipsoid in PLANE style. Make usetextaxes work for ellipsoids too.
*
......@@ -1033,7 +1036,7 @@ void specks_recolor( struct stuff *st, struct specklist *sl, int by )
cmin = vd->cmin, cmax = vd->cmax;
if(cmin == cmax && cmin == 0 || (vd->call && !vd->cexact)) {
if((cmin == cmax && cmin == 0) || (vd->call && !vd->cexact)) {
vd->cmin = cmin = vd->min;
vd->cmax = cmax = vd->max;
}
......@@ -1121,7 +1124,7 @@ void specks_resize( struct stuff *st, struct specklist *sl, int by )
lbase = vd->lbase;
labs = (vd->lop == L_ABS);
lmin = vd->lmin, lmax = vd->lmax;
if(lmin == lmax && lmin == 0 || vd->lall) {
if((lmin == lmax && lmin == 0) || vd->lall) {
vd->lmin = lmin = vd->min;
vd->lmax = lmax = vd->max;
}
......@@ -1378,7 +1381,7 @@ void specks_add_annotation( struct stuff *st, char *annotation, int timestep )
void swab32( int n, int *ovp, int *ivp ) {
while(n-- > 0) {
register unsigned int v = *ivp++;
*ovp++ = (v>>24)&0xFF | (v>>8)&0xFF00 | (v&0xFF00)<<8 | (v&0xFF)<<24;
*ovp++ = ((v>>24)&0xFF) | ((v>>8)&0xFF00) | ((v&0xFF00)<<8) | ((v&0xFF)<<24);
}
}
......@@ -2161,6 +2164,11 @@ void drawspecks( struct stuff *st )
case F_LREGION:
if(st->fadeknee2 <= 0) faderball2 = 1;
break;
case F_SPHERICAL:
case F_PLANAR:
case F_LINEAR:
break;
}
......@@ -3173,7 +3181,7 @@ void specks_draw_ellipsoid( struct stuff *st, struct ellipsoid *e )
int u, v;
float *su, *cu, *sv, *cv;
if(st->boxlevelmask == 0 || e->level >= 0 && ((1 << e->level) & st->boxlevelmask) == 0)
if(st->boxlevelmask == 0 || (e->level >= 0 && ((1 << e->level) & st->boxlevelmask) == 0))
return;
if(nu == 0 && nv == 0) {
......@@ -3278,6 +3286,13 @@ void specks_draw_ellipsoid( struct stuff *st, struct ellipsoid *e )
}
glEnd();
break;
case S_OFF:
break;
case S_HALO:
// XXX what?
break;
}
glPopMatrix();
}
......@@ -3401,6 +3416,13 @@ void specks_draw_mesh( struct stuff *st, register struct mesh *m, int *texturing
glVertex3fv( &m->pts[v*m->nu].x[0] );
glEnd();
break;
case S_HALO:
// what?
break;
case S_OFF:
break;
}
break;
......@@ -5057,7 +5079,7 @@ void specks_read( struct stuff **stp, char *fname )
i = 1;
if(argc > 1 && sscanf(argv[1], "%d", &txno) > 0)
i = 2;
while(i < argc && (key = argv[i])[0] == '-' || key[0] == '+') {
while(i < argc && ((key = argv[i])[0] == '-' || key[0] == '+')) {
int tqual = (strchr(key,'m') ? TXQ_MIPMAP:0) |
(strchr(key,'l') ? TXQ_LINEAR:0) |
(strchr(key,'n') ? TXQ_NEAREST:0);
......@@ -5382,7 +5404,7 @@ static struct AMRbox *findboxno( struct AMRbox *box, int boxno, int *count, int
int specks_gobox( struct stuff *st, int boxno, int argc, char *argv[] )
{
Point pmid;
int bmin = 1<<30, bmax = -1<<30;
int bmin = 1<<30, bmax = -2000000000;
int count = 0;
struct AMRbox *box = NULL;
......@@ -6186,6 +6208,7 @@ specks_parse_args( struct stuff **stp, int argc, char *argv[] )
case F_PLANAR: fmt = "fade planar (1/r^2 from eye plane)"; break;
case F_CONSTANT: fmt = "fade const %g (as if seen at given dist)"; break;
case F_LINEAR: fmt = "fade linear %g (1/r, scaled to match planar at dist)"; break;
case F_KNEE2: fmt = "fade knees2 %g %g %g (fardist, steepness, neardist)"; break; // XXX there is no fade knees2
case F_KNEE12: fmt = "fade knees %g %g %g (fardist, steepness, neardist)"; break;
case F_LREGION: fmt = "fade lregion %g %g %g %g %g %g (refdist; steepness, Rregion)"; break;
}
......@@ -6555,7 +6578,7 @@ specks_parse_args( struct stuff **stp, int argc, char *argv[] )
st->coloredby, vd->name, vd->cmin,
vd->min,vd->max, st->ncmap-1);
} else {
if(vd->min == vd->cmin && vd->max == vd->cmax || vd->nsamples==0) {
if((vd->min == vd->cmin && vd->max == vd->cmax) || vd->nsamples==0) {
msg("coloring-by %d(%s) %g.. %g mean %.3g]",
st->coloredby, vd->name,
vd->cmin, vd->cmax, vd->mean);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment