Update of /cvsroot/fink/dists/10.7/stable/main/finkinfo/sci In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv30977
Added Files: pymol-py-clang.patch Log Message: add syntax fixes recommended by clang --- NEW FILE: pymol-py-clang.patch --- --- pymol-1.5/layer0/Tetsurf.c.orig 2013-06-07 19:07:33.000000000 -0400 +++ pymol-1.5/layer0/Tetsurf.c 2013-06-07 19:08:35.000000000 -0400 @@ -712,8 +712,7 @@ if(I->Tri) { VLAFreeP(I->Tri); } - if(I->PtLink); - { + if(I->PtLink) { VLAFreeP(I->PtLink); } if(I->VertexCodes) { --- pymol-1.5/layer1/P.c.orig 2013-06-07 19:19:20.000000000 -0400 +++ pymol-1.5/layer1/P.c 2013-06-07 19:19:39.000000000 -0400 @@ -2618,7 +2618,7 @@ /* don't run if we're currently banned */ char *buffer = 0; int size, curSize = 0; - while(size = OrthoCommandOutSize(G)){ + while((size = OrthoCommandOutSize(G))){ if (!curSize){ buffer = VLACalloc(char, size); curSize = size; @@ -2662,7 +2662,7 @@ int did_work = false; char *buffer = 0; int size, curSize = 0; - while(size = OrthoCommandOutSize(G)){ + while((size = OrthoCommandOutSize(G))){ if (!curSize){ buffer = VLACalloc(char, size); curSize = size; --- pymol-1.5/layer1/Ortho.c.orig 2013-06-07 19:10:57.000000000 -0400 +++ pymol-1.5/layer1/Ortho.c 2013-06-07 19:16:16.000000000 -0400 @@ -1088,7 +1088,7 @@ curLine = I->CurLine & OrthoSaveLines; if(I->PromptChar) { strcpy(buffer, I->Line[curLine]); - if(PComplete(G, buffer + I->PromptChar, sizeof(OrthoLineType) - I->PromptChar)); /* just print, don't complete */ + PComplete(G, buffer + I->PromptChar, sizeof(OrthoLineType) - I->PromptChar); /* just print, don't complete */ } } break; --- pymol-1.5/layer1/Control.c.orig 2013-06-07 19:20:31.000000000 -0400 +++ pymol-1.5/layer1/Control.c 2013-06-07 19:20:50.000000000 -0400 @@ -709,7 +709,7 @@ but_bottom = y - (cControlBoxSize - 1); but_height = cControlBoxSize; - if((but_num == I->Active)) { + if(but_num == I->Active) { draw_button(but_left, but_bottom, but_width, but_height, lightEdge, darkEdge, pushed); } else if(((but_num == 6) && ((int) SettingGet(G, cSetting_seq_view))) || --- pymol-1.5/layer1/Scene.c.orig 2013-06-07 19:22:02.000000000 -0400 +++ pymol-1.5/layer1/Scene.c 2013-06-07 19:41:53.000000000 -0400 @@ -7686,7 +7686,7 @@ /* update all gadgets first (single-threaded since they're thread-unsafe) */ rec = NULL; while(ListIterate(I->Obj, rec, next)) { - if((rec->obj->type == cObjectGadget)) { + if(rec->obj->type == cObjectGadget) { if(rec->obj->fUpdate) rec->obj->fUpdate(rec->obj); } --- pymol-1.5/layer2/ObjectMolecule.c.orig 2013-06-07 19:42:56.000000000 -0400 +++ pymol-1.5/layer2/ObjectMolecule.c 2013-06-07 19:46:08.000000000 -0400 @@ -1390,7 +1390,7 @@ int NPHIH, MPHIA, NHPARM, NPARM, NNB, NRES; int NBONA, NTHETA, NPHIA, NUMBND, NUMANG, NPTRA; int NATYP, NPHB, IFPERT, NBPER, NGPER, NDPER; - int MBPER, MGPER, MDPER, IFBOX, NMXRS, IFCAP; + int MBPER, MGPER, MDPER, IFBOX = 0, NMXRS, IFCAP; int NEXTRA, IPOL = 0; int wid, col; float BETA; @@ -2018,7 +2018,7 @@ if(IFBOX > 0) { - int IPTRES, NSPM, NSPSOL; + int IPTRES, NSPM = 0, NSPSOL; if(amber7) { p = findflag(G, buffer, "SOLVENT_POINTERS", "3I8"); @@ -10478,7 +10478,7 @@ rms = MatrixFitRMSTTTf(G, op->nvv1, op->vv1, vt, NULL, op->ttt); else rms = MatrixGetRMS(G, op->nvv1, op->vv1, vt, NULL); - if((op->i1 == 2)) { + if(op->i1 == 2) { ObjectMoleculeTransformTTTf(I, op->ttt, b); if(op->i3) { --- pymol-1.5/layer2/ObjectMolecule2.c.orig 2013-06-07 19:47:12.000000000 -0400 +++ pymol-1.5/layer2/ObjectMolecule2.c 2013-06-07 19:47:49.000000000 -0400 @@ -3624,7 +3624,7 @@ #else int ok = true; ObjectMolecule *I = NULL; - int discrete_flag; + int discrete_flag = 0; int ll; (*result) = NULL; --- pymol-1.5/layer2/RepSurface.c.orig 2013-06-07 19:48:34.000000000 -0400 +++ pymol-1.5/layer2/RepSurface.c 2013-06-07 19:49:43.000000000 -0400 @@ -5653,7 +5653,7 @@ SurfaceJobAtomInfo *j_atom_info = atom_info + j; if(j > a) /* only check if this is atom trails */ if((!present) || present[j]) { - if((j_atom_info->vdw == a_atom_info->vdw)) { /* handle singularities */ + if(j_atom_info->vdw == a_atom_info->vdw) { /* handle singularities */ float *v1 = coord + 3 * j; if((v0[0] == v1[0]) && (v0[1] == v1[1]) && (v0[2] == v1[2])) skip_flag = true; @@ -5747,7 +5747,7 @@ SurfaceJobAtomInfo *j_atom_info = atom_info + j; if(j > a) /* only check if this is atom trails */ if((!present) || present[j]) { - if((j_atom_info->vdw == a_atom_info->vdw)) { /* handle singularities */ + if(j_atom_info->vdw == a_atom_info->vdw) { /* handle singularities */ float *v2 = coord + 3 * j; if((v0[0] == v2[0]) && (v0[1] == v2[1]) && (v0[2] == v2[2])) skip_flag = true; @@ -5917,7 +5917,7 @@ SurfaceJobAtomInfo *j_atom_info = atom_info + j; if(j > a) /* only check if this is atom trails */ if((!present) || present[j]) { - if((j_atom_info->vdw == a_atom_info->vdw)) { /* handle singularities */ + if(j_atom_info->vdw == a_atom_info->vdw) { /* handle singularities */ float *v1 = coord + 3 * j; if((v0[0] == v1[0]) && (v0[1] == v1[1]) && (v0[2] == v1[2])) skip_flag = true; --- pymol-1.5/modules/cealign/src/tnt/tnt_array1d.h.orig 2013-06-07 19:51:46.000000000 -0400 +++ pymol-1.5/modules/cealign/src/tnt/tnt_array1d.h 2013-06-07 19:52:08.000000000 -0400 @@ -258,7 +258,7 @@ template <class T> inline Array1D<T> Array1D<T>::subarray(int i0, int i1) { - if ((i0 >= 0) && (i1 < n_) || (i0 <= i1)) + if (((i0 >= 0) && (i1 < n_)) || (i0 <= i1)) { Array1D<T> X(*this); /* create a new instance of this array. */ X.n_ = i1-i0+1; --- pymol-1.5/modules/cealign/src/tnt/tnt_fortran_array1d.h.orig 2013-06-07 19:53:25.000000000 -0400 +++ pymol-1.5/modules/cealign/src/tnt/tnt_fortran_array1d.h 2013-06-07 19:53:54.000000000 -0400 @@ -221,7 +221,7 @@ #ifdef TNT_DEBUG std::cout << "entered subarray. \n"; #endif - if ((i0 > 0) && (i1 < n_) || (i0 <= i1)) + if (((i0 > 0) && (i1 < n_)) || (i0 <= i1)) { Fortran_Array1D<T> X(*this); /* create a new instance of this array. */ X.n_ = i1-i0+1; --- pymol-1.5/layer3/Executive.c.orig 2013-06-07 19:55:06.000000000 -0400 +++ pymol-1.5/layer3/Executive.c 2013-06-07 19:56:00.000000000 -0400 @@ -17137,7 +17137,7 @@ ExecutiveSpecSetVisibility(G, rec, true, mod, false); I->LastChanged = rec; } - if((mod == (cOrthoSHIFT | cOrthoCTRL))) { + if(mod == (cOrthoSHIFT | cOrthoCTRL)) { if(rec != I->LastZoomed) ExecutiveWindowZoom(G, rec->name, 0.0F, -1, false, -1.0F, true); --- pymol-1.5/contrib/uiuc/plugins/molfile_plugin/src/gamessplugin.c.orig 2013-06-07 19:57:24.000000000 -0400 +++ pymol-1.5/contrib/uiuc/plugins/molfile_plugin/src/gamessplugin.c 2013-06-07 19:57:54.000000000 -0400 @@ -375,7 +375,7 @@ const char *filetype, int *natoms) { FILE *fd; - qmdata_t *data; + qmdata_t *data = NULL; gmsdata *gms; /* open the input file */ --- pymol-1.5/contrib/uiuc/plugins/molfile_plugin/src/moldenplugin.c.orig 2013-06-07 19:59:19.000000000 -0400 +++ pymol-1.5/contrib/uiuc/plugins/molfile_plugin/src/moldenplugin.c 2013-06-07 19:59:37.000000000 -0400 @@ -99,7 +99,7 @@ const char *filetype, int *natoms) { FILE *fd; - qmdata_t *data; + qmdata_t *data = NULL; moldendata_t *moldendata; char buffer[1024]; char keystring[20]; --- pymol-1.5/layer4/Cmd.c.orig 2013-06-07 20:01:48.000000000 -0400 +++ pymol-1.5/layer4/Cmd.c 2013-06-07 20:03:00.000000000 -0400 @@ -1881,7 +1881,7 @@ static PyObject *CmdGetRenderer(PyObject * self, PyObject * args) { PyMOLGlobals *G = NULL; - char *vendor, *renderer, *version; + char *vendor = NULL, *renderer = NULL, *version = NULL; int ok = false; ok = PyArg_ParseTuple(args, "O", &self); if(ok) { --- pymol-1.5/contrib/uiuc/plugins/molfile_plugin/src/graspplugin.cpp.orig 2013-06-07 20:04:28.000000000 -0400 +++ pymol-1.5/contrib/uiuc/plugins/molfile_plugin/src/graspplugin.cpp 2013-06-07 20:04:44.000000000 -0400 @@ -104,7 +104,7 @@ ///ojo aqui le quite el ! if ((grassp->flag)!=POTENTIALS) { - if (index >=0 && index <= 4) + if (index <= 4) printf("graspplugin) No data available for '%s' option\n", name[index]); else printf("graspplugin) out of range property, flag: %d index: %d\n", grassp->flag, index); --- pymol-1.5/contrib/uiuc/plugins/molfile_plugin/src/maeffplugin.cpp.orig 2013-06-07 20:09:26.000000000 -0400 +++ pymol-1.5/contrib/uiuc/plugins/molfile_plugin/src/maeffplugin.cpp 2013-06-07 20:09:56.000000000 -0400 @@ -1983,7 +1983,7 @@ } } catch (std::exception &e) { - fprintf(stderr, e.what()); + fprintf(stderr, "%s", e.what()); return MOLFILE_ERROR; } return MOLFILE_SUCCESS; --- pymol-1.5/contrib/pyopengl/openglutil.c.orig 2013-06-07 20:11:42.000000000 -0400 +++ pymol-1.5/contrib/pyopengl/openglutil.c 2013-06-07 20:12:18.000000000 -0400 @@ -278,7 +278,7 @@ if (pix > 127.0) bitpixel |= 0x01; - fprintf(fp, "%02hx", bitpixel); + fprintf(fp, "%02hhx", bitpixel); if (++pos >= 40) { fprintf(fp, "\n%%"); pos = 0; @@ -320,7 +320,7 @@ curpix = (unsigned char *) pixels; pos = 0; for (i = width * height * components; i > 0; i--) { - fprintf(fp, "%02hx", *curpix++); + fprintf(fp, "%02hhx", *curpix++); if (++pos >= 40) { fprintf(fp, "\n"); pos = 0; --- pymol-1.5/contrib/uiuc/plugins/molfile_plugin/src/pbeqplugin.cpp.orig 2013-06-07 20:21:43.000000000 -0400 +++ pymol-1.5/contrib/uiuc/plugins/molfile_plugin/src/pbeqplugin.cpp 2013-06-07 20:22:02.000000000 -0400 @@ -259,7 +259,7 @@ int addr = z*nclx*ncly + y*nclx + x; if (fread(datablock + addr, 4, 1, fd) != 1) { printf("pbeqplugin) Error reading potential map cell: %d,%d,%d\n", x, y, z); - printf("pbeqplugin) offset: %d\n", ftell(fd)); + printf("pbeqplugin) offset: %ld\n", ftell(fd)); return MOLFILE_ERROR; } count++; --- pymol-1.5/contrib/uiuc/plugins/molfile_plugin/src/vtfplugin.c.orig 2013-06-07 20:26:11.000000000 -0400 +++ pymol-1.5/contrib/uiuc/plugins/molfile_plugin/src/vtfplugin.c 2013-06-07 20:37:17.000000000 -0400 @@ -231,7 +231,7 @@ switch (tolower(keyword[0])) { case 'n': { /* name */ - if (sscanf(s, "%16s %n", &atom.name, &n) < 1) { + if (sscanf(s, "%16s %n", (char *) &atom.name, &n) < 1) { vtf_error("could not get name in atom record", line); return MOLFILE_ERROR; } @@ -240,7 +240,7 @@ } case 't': { /* type */ - if (sscanf(s, "%16s %n", &atom.type, &n) < 1) { + if (sscanf(s, "%16s %n", (char *) &atom.type, &n) < 1) { vtf_error("could not get type in atom record", line); return MOLFILE_ERROR; } @@ -266,7 +266,7 @@ } else if (strcmp(keyword, "res") == 0 || strcmp(keyword, "resname") == 0) { /* resname */ - if (sscanf(s, "%8s %n", &atom.resname, &n) < 1) { + if (sscanf(s, "%8s %n", (char *) &atom.resname, &n) < 1) { vtf_error("could not get resname in atom record", line); return MOLFILE_ERROR; } @@ -281,7 +281,7 @@ } case 's': { /* segid */ - if (sscanf(s, "%8s %n", &atom.segid, &n) < 1) { + if (sscanf(s, "%8s %n", (char *) &atom.segid, &n) < 1) { vtf_error("could not get segid in atom record", line); return MOLFILE_ERROR; } @@ -290,7 +290,7 @@ } case 'i': { /* insertion */ - if (sscanf(s, "%2s %n", &atom.insertion, &n) < 1) { + if (sscanf(s, "%2s %n", (char *) &atom.insertion, &n) < 1) { vtf_error("could not get insertion in atom record", line); return MOLFILE_ERROR; } @@ -302,7 +302,7 @@ /* chain, charge */ if (strlen(keyword) == 1 || strcmp(keyword, "chain") == 0) { - if (sscanf(s, "%2s %n", &atom.chain, &n) < 1) { + if (sscanf(s, "%2s %n", (char *) &atom.chain, &n) < 1) { vtf_error("could not get chain in atom record", line); return MOLFILE_ERROR; } @@ -336,7 +336,7 @@ } d->optflags |= MOLFILE_ATOMICNUMBER; } else if (strcmp(keyword, "altloc")) { - if (sscanf(s, "%2s %n", &atom.altloc, &n) < 1) { + if (sscanf(s, "%2s %n", (char *) &atom.altloc, &n) < 1) { vtf_error("could not get altloc in atom record", line); return MOLFILE_ERROR; } ------------------------------------------------------------------------------ How ServiceNow helps IT people transform IT departments: 1. A cloud service to automate IT design, transition and operations 2. Dashboards that offer high-level views of enterprise services 3. A single system of record for all IT processes http://p.sf.net/sfu/servicenow-d2d-j _______________________________________________ Fink-commits mailing list Fink-commits@lists.sourceforge.net http://news.gmane.org/gmane.os.apple.fink.cvs