Ticket #34408: molmol-warnings.diff

File molmol-warnings.diff, 9.0 KB (added by howarth@…, 12 years ago)

reduce clang warnings in molmol build

  • src/calc/CalcRmsd.c

    old new  
    10251025  }
    10261026
    10271027  for (propI = 0; propI < 2; propI++) {
    1028     if (groupNo == 0 || propI == 0 && ! calc1)
     1028    if (groupNo == 0 || (propI == 0 && ! calc1))
    10291029      continue;
    10301030
    1031     if (groupNo == 0 || propI == 1 && ! calc2)
     1031    if (groupNo == 0 || (propI == 1 && ! calc2))
    10321032      continue;
    10331033
    10341034    Report("\nAverage RMSD, dev., min. and max of ");
     
    10521052      Report(" ");
    10531053
    10541054      for (groupI2 = 0; groupI2 < groupNo; groupI2++) {
    1055         if (groupI1 < groupI2 &&
    1056             groupInfoP[groupI1].membNo != groupInfoP[groupI2].membNo ||
     1055        if (((groupI1 < groupI2) &&
     1056            (groupInfoP[groupI1].membNo != groupInfoP[groupI2].membNo)) ||
    10571057            groupInfoP[groupI1].membNo == 0 ||
    10581058            groupInfoP[groupI2].membNo == 0) {
    10591059          groupInfoP[groupI2].stat.avg = 0.0f;
  • src/cmdfig/FigUtil.c

    old new  
    4444} TabEntry;
    4545
    4646static TabEntry GreekTab[] = {
    47   "ALPHA",   'a',
    48   "BETA",    'b',
    49   "CHI",     'c',
    50   "DELTA",   'd',
    51   "EPSILON", 'e',
    52   "PHI" ,    'f',
    53   "GAMMA",   'g',
    54   "ETA",     'h',
    55   "IOTA",    'i',
    56   "KAPPA",   'k',
    57   "LAMBDA",  'l',
    58   "MU",      'm',
    59   "NU",      'n',
    60   "PI",      'p',
    61   "THETA",   'q',
    62   "RHO",     'r',
    63   "SIGMA",   's',
    64   "TAU",     't',
    65   "UPSILON", 'u',
    66   "OMEGA",   'w',
    67   "XI",      'x',
    68   "PSI",     'y',
    69   "ZETA",    'z'
     47  {"ALPHA",   'a'},
     48  {"BETA",    'b'},
     49  {"CHI",     'c'},
     50  {"DELTA",   'd'},
     51  {"EPSILON", 'e'},
     52  {"PHI" ,    'f'},
     53  {"GAMMA",   'g'},
     54  {"ETA",     'h'},
     55  {"IOTA",    'i'},
     56  {"KAPPA",   'k'},
     57  {"LAMBDA",  'l'},
     58  {"MU",      'm'},
     59  {"NU",      'n'},
     60  {"PI",      'p'},
     61  {"THETA",   'q'},
     62  {"RHO",     'r'},
     63  {"SIGMA",   's'},
     64  {"TAU",     't'},
     65  {"UPSILON", 'u'},
     66  {"OMEGA",   'w'},
     67  {"XI",      'x'},
     68  {"PSI",     'y'},
     69  {"ZETA",    'z'}
    7070};
    7171
    7272int
  • src/cmdio/ExWriteSec.c

    old new  
    250250
    251251        if (neighLStart != NO_RES) {
    252252          if (num != neighLEnd + 1 ||
    253               neighNum != neighREnd + 1 && neighNum != neighREnd - 1 ||
    254               neighREnd > neighRStart && neighNum != neighREnd + 1 ||
    255               neighREnd < neighRStart && neighNum != neighREnd - 1) {
     253              (neighNum != neighREnd + 1 && neighNum != neighREnd - 1) ||
     254              (neighREnd > neighRStart && neighNum != neighREnd + 1) ||
     255              (neighREnd < neighRStart && neighNum != neighREnd - 1)) {
    256256            writeNeigh(neighLStart, neighLEnd, neighRStart, neighREnd);
    257257            neighLStart = NO_RES;
    258258          } else {
  • src/data/DataDist.c

    old new  
    116116  entryP->atom2I = DhAtomGetNumber(atom2P);
    117117
    118118  if (entryP->res1I > entryP->res2I ||
    119       entryP->res1I == entryP->res2I && entryP->atom1I > entryP->atom2I) {
     119      (entryP->res1I == entryP->res2I && entryP->atom1I > entryP->atom2I)) {
    120120    t = entryP->res1I;
    121121    entryP->res1I = entryP->res2I;
    122122    entryP->res2I = t;
  • src/data/DataHand.c

    old new  
    20432043      groupNum1 = getGroupNum(bondAddP->res1P->molP);
    20442044      groupNum2 = getGroupNum(bondAddP->res2P->molP);
    20452045      if (atom1P->state == AS_VALID && atom2P->state == AS_VALID &&
    2046           (groupNum1 == groupNum && groupNum2 == groupNum ||
    2047           groupNum < 0 && groupNum1 != groupNum2))
     2046          ((groupNum1 == groupNum && groupNum2 == groupNum) ||
     2047          (groupNum < 0 && groupNum1 != groupNum2)))
    20482048        applyF(bondP, atom1P, atom2P, clientData);
    20492049    }
    20502050    bondAddP = nextBondAddP;
     
    23672367    groupNum1 = getGroupNum(distP->res1P->molP);
    23682368    groupNum2 = getGroupNum(distP->res2P->molP);
    23692369    if (atom1P->state == AS_VALID && atom2P->state == AS_VALID &&
    2370         (groupNum1 == groupNum && groupNum2 == groupNum ||
    2371         groupNum < 0 && groupNum1 != groupNum2))
     2370        ((groupNum1 == groupNum && groupNum2 == groupNum) ||
     2371        (groupNum < 0 && groupNum1 != groupNum2)))
    23722372      applyF(distP, atom1P, atom2P, clientData);
    23732373  }
    23742374}
  • src/expr/ExprScan.c

    old new  
    221221        for (;;) {
    222222          if (isdigit(ch)) {
    223223            DStrAppChar(StrVal, ch);
    224           } else if (ch == '.' && ExprStr[1] != '.' ||
     224          } else if ((ch == '.' && ExprStr[1] != '.') ||
    225225              ch == 'e' || ch == 'E') {
    226226            DStrAppChar(StrVal, ch);
    227227            isFloat = TRUE;
  • src/motif/MotifDial.c

    old new  
    13231323
    13241324  switch (type) {
    13251325  case PU_CT_ACTIVATE:
    1326     if (gType == GIZMO_TEXT_FIELD || GIZMO_TEXT)
     1326    if (gType == (GIZMO_TEXT_FIELD | GIZMO_TEXT))
    13271327      XtAddCallback(gizmo, XmNactivateCallback, textActivateCB, infoP);
    13281328    else if (gType == GIZMO_BUTTON)
    13291329      XtAddCallback(gizmo, XmNactivateCallback, gizmoGenCB, infoP);
  • src/motif/MotifMainW.c

    old new  
    8080{
    8181  Window *winP = (Window *) arg;
    8282
    83   return eventP->type == ButtonPress && eventP->xbutton.window == *winP ||
    84       eventP->type == Expose && eventP->xexpose.window == *winP;
     83  return (eventP->type == ButtonPress && eventP->xbutton.window == *winP) ||
     84      (eventP->type == Expose && eventP->xexpose.window == *winP);
    8585}
    8686
    8787static void
  • src/os/GFile.c

    old new  
    383383{
    384384  if (gf->format == GF_FORMAT_MEMORY)
    385385    return gf->currP == NULL ||
    386         gf->currP->nextP == NULL && gf->currPos == gf->currP->len;
     386        (gf->currP->nextP == NULL && gf->currPos == gf->currP->len);
    387387  else
    388388    return feof(gf->fp);
    389389}
  • src/prim/PrimDraw.c

    old new  
    461461  }
    462462
    463463  if (partP->paint == RP_ATOM ||
    464       partP->paint == RP_ATOM_SMOOTH && partP->polyNo > 0)
     464      (partP->paint == RP_ATOM_SMOOTH && partP->polyNo > 0))
    465465    SgSetColor(attrP->colR, attrP->colG, attrP->colB);
    466466
    467467  if (partP->paint == RP_ATOM_SMOOTH)
  • src/prim/RibbonCalc.c

    old new  
    907907    getSplinePoints(partP, ribbonP, ePar, partP->endPar, ePNo + 1,
    908908        parA + sPNo + mPNo - 1, xA + sPNo + mPNo - 1, dzA + sPNo + mPNo - 1);
    909909
    910   if (partP->style == RS_ROUND && partP->midRad == 0.0f ||
     910  if ((partP->style == RS_ROUND && partP->midRad == 0.0f) ||
    911911      BreakInterrupted()) {
    912912    /* draw only one line */
    913913    partP->traceNo = 1;
     
    11281128        Vec3Copy(partP->traceA[traceI].nvA[pointI], nv);
    11291129      }
    11301130
    1131       if (pointI == 0 && partP->startStyle == RE_SHARP ||
    1132           pointI == pointNo - ePNo && partP->endStyle == RE_ARROW)
     1131      if ((pointI == 0 && partP->startStyle == RE_SHARP) ||
     1132          (pointI == pointNo - ePNo && partP->endStyle == RE_ARROW))
    11331133        Vec3Copy(partP->polyA[polyI].xA[traceNo - 1 - traceI], x);
    11341134      else if (pointI == pointNo - 1 && partP->endStyle == RE_SHARP)
    11351135        Vec3Copy(partP->polyA[polyI].xA[traceI], x);
    11361136    }
    11371137
    1138     if (pointI == 0 && partP->startStyle == RE_SHARP ||
    1139         pointI == pointNo - ePNo && partP->endStyle == RE_ARROW) {
     1138    if ((pointI == 0 && partP->startStyle == RE_SHARP) ||
     1139        (pointI == pointNo - ePNo && partP->endStyle == RE_ARROW)) {
    11401140      Vec3Copy(x, dy);
    11411141      Vec3Cross(x, dx);
    11421142      Vec3Copy(partP->polyA[polyI].nv, x);
     
    13271327
    13281328  if (! partP->pointValid || prec != partP->prec ||
    13291329      startRad != partP->startRad ||
    1330       partP->style == RS_ROUND && midRad != partP->midRad ||
     1330      (partP->style == RS_ROUND && midRad != partP->midRad) ||
    13311331      endRad != partP->endRad || radChanged) {
    13321332    for (i = 0; i < partP->traceNo; i++) {
    13331333      free(partP->traceA[i].xA);
  • src/pudev/PuMainW.c

    old new  
    5757      if (text[0] != LOCK_CHAR)
    5858        return;
    5959      text++;
    60       if (text[0] == '\0' || text[0] == ' ' && text[1] == '\0') {
     60      if (text[0] == '\0' || (text[0] == ' ' && text[1] == '\0')) {
    6161        StatusLocked = FALSE;
    6262        text = " ";
    6363      }
  • src/tty/TTY.c

    old new  
    164164void
    165165PuTTYSetTextField(PuTextFieldChoice fieldChoice, char *text)
    166166{
    167   if (text[0] == '\0' || text[0] == ' ' && text[1] == '\0')
     167  if (text[0] == '\0' || (text[0] == ' ' && text[1] == '\0'))
    168168    return;
    169169
    170170  switch (fieldChoice) {
  • tools/src/IsoSurface.c

    old new  
    158158static BOOL
    159159equalPair(int i00, int i01, int i10, int i11)
    160160{
    161   return i00 == i10 && i01 == i11 || i00 == i11 && i01 == i10;
     161  return (i00 == i10 && i01 == i11) || (i00 == i11 && i01 == i10);
    162162}
    163163
    164164static int