| 1 | Index: layer0/ShaderMgr.c |
| 2 | =================================================================== |
| 3 | --- layer0/ShaderMgr.c (revision 4039) |
| 4 | +++ layer0/ShaderMgr.c (working copy) |
| 5 | @@ -150,7 +150,7 @@ void CShaderPrg_ReplaceStringsInPlace(Py |
| 6 | while (replaceStrings[i]){ |
| 7 | slen = strlen(replaceStrings[i]); |
| 8 | rlen = strlen(replaceStrings[i+1]); |
| 9 | - while(rstr=strstr(dest_line, replaceStrings[i])){ |
| 10 | + while((rstr=strstr(dest_line, replaceStrings[i]))){ |
| 11 | strcpy(tmp_line, rstr + slen); |
| 12 | strcpy(rstr, replaceStrings[i+1]); |
| 13 | strcpy(rstr+rlen, tmp_line); |
| 14 | @@ -488,15 +488,15 @@ void CShaderPrg_BindAttribLocations(PyMO |
| 15 | if (I){ |
| 16 | GLenum err ; |
| 17 | glBindAttribLocation(I->id, VERTEX_POS, "a_Vertex"); |
| 18 | - if (err = glGetError()){ |
| 19 | + if ((err = glGetError())){ |
| 20 | PRINTFB(G, FB_ShaderMgr, FB_Warnings) "GLERROR: a_Vertex: %d\n", err ENDFB(G); |
| 21 | } |
| 22 | glBindAttribLocation(I->id, VERTEX_NORMAL, "a_Normal"); |
| 23 | - if (err = glGetError()){ |
| 24 | + if ((err = glGetError())){ |
| 25 | PRINTFB(G, FB_ShaderMgr, FB_Warnings) "GLERROR: a_Normal: %d\n", err ENDFB(G); |
| 26 | } |
| 27 | glBindAttribLocation(I->id, VERTEX_COLOR, "a_Color"); |
| 28 | - if (err = glGetError()){ |
| 29 | + if ((err = glGetError())){ |
| 30 | PRINTFB(G, FB_ShaderMgr, FB_Warnings) "GLERROR: a_Color: %d\n", err ENDFB(G); |
| 31 | } |
| 32 | CShaderPrg_Link(I); |
| 33 | @@ -510,19 +510,19 @@ void CShaderPrg_BindCylinderAttribLocati |
| 34 | if (I){ |
| 35 | GLenum err ; |
| 36 | glBindAttribLocation(I->id, CYLINDER_ORIGIN, "attr_origin"); |
| 37 | - if (err = glGetError()){ |
| 38 | + if ((err = glGetError())){ |
| 39 | PRINTFB(G, FB_ShaderMgr, FB_Warnings) "GLERROR: attr_origin: %d\n", err ENDFB(G); |
| 40 | } |
| 41 | glBindAttribLocation(I->id, CYLINDER_AXIS, "attr_axis"); |
| 42 | - if (err = glGetError()){ |
| 43 | + if ((err = glGetError())){ |
| 44 | PRINTFB(G, FB_ShaderMgr, FB_Warnings) "GLERROR: attr_axis: %d\n", err ENDFB(G); |
| 45 | } |
| 46 | glBindAttribLocation(I->id, CYLINDER_COLOR, "attr_color"); |
| 47 | - if (err = glGetError()){ |
| 48 | + if ((err = glGetError())){ |
| 49 | PRINTFB(G, FB_ShaderMgr, FB_Warnings) "GLERROR: attr_color: %d\n", err ENDFB(G); |
| 50 | } |
| 51 | glBindAttribLocation(I->id, CYLINDER_COLOR2, "attr_color2"); |
| 52 | - if (err = glGetError()){ |
| 53 | + if ((err = glGetError())){ |
| 54 | PRINTFB(G, FB_ShaderMgr, FB_Warnings) "GLERROR: attr_color2: %d\n", err ENDFB(G); |
| 55 | } |
| 56 | CShaderPrg_Link(I); |
| 57 | @@ -842,11 +842,11 @@ void ShaderMgrConfig(PyMOLGlobals * G) { |
| 58 | if (indicatorShader){ |
| 59 | GLenum err ; |
| 60 | glBindAttribLocation(indicatorShader->id, VERTEX_POS, "a_Vertex"); |
| 61 | - if (err = glGetError()){ |
| 62 | + if ((err = glGetError())){ |
| 63 | PRINTFB(G, FB_ShaderMgr, FB_Warnings) "GLERROR: a_Vertex: %d\n", err ENDFB(G); |
| 64 | } |
| 65 | glBindAttribLocation(indicatorShader->id, VERTEX_COLOR, "a_Color"); |
| 66 | - if (err = glGetError()){ |
| 67 | + if ((err = glGetError())){ |
| 68 | PRINTFB(G, FB_ShaderMgr, FB_Warnings) "GLERROR: a_Color: %d\n", err ENDFB(G); |
| 69 | } |
| 70 | CShaderPrg_Link(indicatorShader); |
| 71 | Index: layer0/Tetsurf.c |
| 72 | =================================================================== |
| 73 | --- layer0/Tetsurf.c (revision 4039) |
| 74 | +++ layer0/Tetsurf.c (working copy) |
| 75 | @@ -679,8 +679,7 @@ static void TetsurfPurge(CTetsurf * II) |
| 76 | if(I->Tri) { |
| 77 | VLAFreeP(I->Tri); |
| 78 | } |
| 79 | - if(I->PtLink); |
| 80 | - { |
| 81 | + if(I->PtLink) { |
| 82 | VLAFreeP(I->PtLink); |
| 83 | } |
| 84 | if(I->VertexCodes) { |
| 85 | Index: layer0/Map.c |
| 86 | =================================================================== |
| 87 | --- layer0/Map.c (revision 4039) |
| 88 | +++ layer0/Map.c (working copy) |
| 89 | @@ -588,7 +588,7 @@ int MapSetupExpress(MapType * I) |
| 90 | register int *link = I->Link; |
| 91 | register int st, flag; |
| 92 | register int *i_ptr3, *i_ptr4, *i_ptr5; |
| 93 | - register int *e_list; |
| 94 | + register int *e_list = NULL; |
| 95 | #ifdef _MemoryCache_ON |
| 96 | register int block_offset = I->block_base + cCache_map_elist_offset; |
| 97 | register int group_id = I->group_id; |
| 98 | Index: layer1/Basis.c |
| 99 | =================================================================== |
| 100 | --- layer1/Basis.c (revision 4039) |
| 101 | +++ layer1/Basis.c (working copy) |
| 102 | @@ -2868,11 +2868,11 @@ int BasisMakeMap(CBasis * I, int *vert2p |
| 103 | float ll; |
| 104 | CPrimitive *prm; |
| 105 | register int i; |
| 106 | - register int *tempRef; |
| 107 | - int n, h, q, x, y, z, j, k, l, e; |
| 108 | + register int *tempRef = NULL; |
| 109 | + int n = 0, h, q, x, y, z, j, k, l, e; |
| 110 | int extra_vert = 0; |
| 111 | float p[3], dd[3], *d1, *d2, vd[3], cx[3], cy[3]; |
| 112 | - float *tempVertex; |
| 113 | + float *tempVertex = NULL; |
| 114 | float xs, ys; |
| 115 | int remapMode = true; /* remap mode means that some objects will span more |
| 116 | * than one voxel, so we have to worry about populating |
| 117 | Index: layer1/CGO.c |
| 118 | =================================================================== |
| 119 | --- layer1/CGO.c (revision 4039) |
| 120 | +++ layer1/CGO.c (working copy) |
| 121 | @@ -47,7 +47,7 @@ Z* ------------------------------------- |
| 122 | #define CLIP_NORMAL_VALUE(cv) ((cv>1.f) ? 127 : (cv < -1.f) ? -128 : pymol_roundf(((cv + 1.f)/2.f) * 255) - 128 ) |
| 123 | |
| 124 | #define CHECK_GL_ERROR_OK(printstr) \ |
| 125 | - if (err = glGetError()){ \ |
| 126 | + if ((err = glGetError())){ \ |
| 127 | PRINTFB(I->G, FB_CGO, FB_Errors) printstr, err ENDFB(I->G); \ |
| 128 | } |
| 129 | |
| 130 | @@ -2279,7 +2279,7 @@ void CGOCountNumVerticesForScreen(CGO *I |
| 131 | *num_total_vertices = 0; |
| 132 | *num_total_indexes = 0; |
| 133 | |
| 134 | - while(op = (CGO_MASK & CGO_read_int(pc))) { |
| 135 | + while((op = (CGO_MASK & CGO_read_int(pc)))) { |
| 136 | save_pc = pc; |
| 137 | err = 0; |
| 138 | switch (op) { |
| 139 | @@ -4339,7 +4339,7 @@ CGO *CGOOptimizeGLSLCylindersToVBOIndexe |
| 140 | GL_C_INT_TYPE *indexVals = 0; |
| 141 | int tot = 4 * 4 * 3 * num_total_cylinders; |
| 142 | short copyToLeftOver, copyColorToLeftOver, copyPickColorToLeftOver, copyAlphaToLeftOver, copyToReturnCGO ; |
| 143 | - float *org_originVals; |
| 144 | + float *org_originVals= NULL; |
| 145 | float *org_axisVals; |
| 146 | float *org_colorVals; |
| 147 | float *org_color2Vals = NULL; |
| 148 | @@ -7101,7 +7101,7 @@ static void CGO_gl_draw_label(CCGORender |
| 149 | int texture_id = CGO_get_int(*pc); |
| 150 | float worldPos[4], screenMin[3], screenMax[3], textExtent[4]; |
| 151 | CShaderPrg * shaderPrg; |
| 152 | - int buf1, buf2, attr_worldpos, attr_screenoffset, attr_texcoords; |
| 153 | + int buf1 = 0, buf2 = 0, attr_worldpos, attr_screenoffset, attr_texcoords; |
| 154 | copy3f(*pc, worldPos); worldPos[3] = 1.f; |
| 155 | copy3f(*pc+3, screenMin); |
| 156 | copy3f(*pc+6, screenMax); |
| 157 | @@ -7142,7 +7142,7 @@ static void CGO_gl_draw_texture(CCGORend |
| 158 | int texture_id = CGO_get_int(*pc); |
| 159 | float worldPos[4], screenMin[3], screenMax[3], textExtent[4]; |
| 160 | CShaderPrg * shaderPrg; |
| 161 | - int buf1, buf2, attr_worldpos, attr_screenoffset, attr_texcoords; |
| 162 | + int buf1 = 0, buf2 = 0, attr_worldpos, attr_screenoffset, attr_texcoords; |
| 163 | copy3f(*pc, worldPos); worldPos[3] = 1.f; |
| 164 | copy3f(*pc+3, screenMin); |
| 165 | copy3f(*pc+6, screenMax); |
| 166 | @@ -9528,7 +9528,7 @@ int CGOCountNumberCustomCylinders(CGO *I |
| 167 | int CGOChangeShadersTo(CGO *I, int frommode, int tomode){ |
| 168 | register float *pc = I->op; |
| 169 | int op = 0, totops = 0; |
| 170 | - while(op = (CGO_MASK & CGO_read_int(pc))) { |
| 171 | + while((op = (CGO_MASK & CGO_read_int(pc)))) { |
| 172 | totops++; |
| 173 | switch (op) { |
| 174 | case CGO_ENABLE: |
| 175 | Index: layer1/Ortho.c |
| 176 | =================================================================== |
| 177 | --- layer1/Ortho.c (revision 4039) |
| 178 | +++ layer1/Ortho.c (working copy) |
| 179 | @@ -1014,7 +1014,7 @@ void OrthoKey(PyMOLGlobals * G, unsigned |
| 180 | curLine = I->CurLine & OrthoSaveLines; |
| 181 | if(I->PromptChar) { |
| 182 | strcpy(buffer, I->Line[curLine]); |
| 183 | - if(PComplete(G, buffer + I->PromptChar, sizeof(OrthoLineType) - I->PromptChar)); /* just print, don't complete */ |
| 184 | + PComplete(G, buffer + I->PromptChar, sizeof(OrthoLineType) - I->PromptChar); /* just print, don't complete */ |
| 185 | } |
| 186 | } |
| 187 | break; |
| 188 | @@ -1394,7 +1394,7 @@ void bg_grad(PyMOLGlobals * G) { |
| 189 | |
| 190 | { |
| 191 | if (!I->bgCGO) { |
| 192 | - CGO *cgo = CGONew(G), *cgo2; |
| 193 | + CGO *cgo = CGONew(G), *cgo2 = NULL; |
| 194 | ok &= CGOBegin(cgo, GL_TRIANGLE_STRIP); |
| 195 | if (ok) |
| 196 | ok &= CGOVertex(cgo, -1.f, -1.f, 0.98f); |
| 197 | Index: layer1/P.c |
| 198 | =================================================================== |
| 199 | --- layer1/P.c (revision 4039) |
| 200 | +++ layer1/P.c (working copy) |
| 201 | @@ -2613,7 +2613,7 @@ int PFlush(PyMOLGlobals * G) |
| 202 | /* don't run if we're currently banned */ |
| 203 | char *buffer = 0; |
| 204 | int size, curSize = 0; |
| 205 | - while(size = OrthoCommandOutSize(G)){ |
| 206 | + while((size = OrthoCommandOutSize(G))){ |
| 207 | if (!curSize){ |
| 208 | buffer = VLACalloc(char, size); |
| 209 | curSize = size; |
| 210 | @@ -2657,7 +2657,7 @@ int PFlushFast(PyMOLGlobals * G) |
| 211 | int did_work = false; |
| 212 | char *buffer = 0; |
| 213 | int size, curSize = 0; |
| 214 | - while(size = OrthoCommandOutSize(G)){ |
| 215 | + while((size = OrthoCommandOutSize(G))){ |
| 216 | if (!curSize){ |
| 217 | buffer = VLACalloc(char, size); |
| 218 | curSize = size; |
| 219 | Index: layer1/Extrude.c |
| 220 | =================================================================== |
| 221 | --- layer1/Extrude.c (revision 4039) |
| 222 | +++ layer1/Extrude.c (working copy) |
| 223 | @@ -753,7 +753,7 @@ int ExtrudeCGOSurfaceTube(CExtrude * I, |
| 224 | float *v; |
| 225 | float *n; |
| 226 | float *c; |
| 227 | - float *sv, *sn, *tv, *tn, *tv1, *tn1, *TV, *TN; |
| 228 | + float *sv, *sn, *tv, *tn, *tv1, *tn1, *TV, *TN = NULL; |
| 229 | float v0[3]; |
| 230 | int start, stop; |
| 231 | int ok = true; |
| 232 | @@ -1683,7 +1683,7 @@ int ExtrudeCGOSurfacePolygon(CExtrude * |
| 233 | float *v; |
| 234 | float *n; |
| 235 | float *c; |
| 236 | - float *sv, *sn, *tv, *tn, *tv1, *tn1, *TV, *TN; |
| 237 | + float *sv, *sn, *tv, *tn, *tv1, *tn1, *TV, *TN = NULL; |
| 238 | float v0[3]; |
| 239 | int ok = true; |
| 240 | |
| 241 | @@ -1737,7 +1737,7 @@ int ExtrudeCGOSurfacePolygon(CExtrude * |
| 242 | for(b = 0; ok && b < I->Ns; b += 2) { |
| 243 | #ifdef _PYMOL_CGO_DRAWARRAYS |
| 244 | int nverts = 2*I->N, pl = 0, plc = 0, damode = CGO_VERTEX_ARRAY | CGO_NORMAL_ARRAY | CGO_PICK_COLOR_ARRAY, nxtn = 3; |
| 245 | - float *vertexVals, *normalVals, *colorVals = 0, *nxtVals = 0, *tmp_ptr; |
| 246 | + float *vertexVals = NULL, *normalVals, *colorVals = 0, *nxtVals = 0, *tmp_ptr; |
| 247 | float *pickColorVals; |
| 248 | GLenum mode = GL_LINE_STRIP; |
| 249 | if(SettingGetGlobal_i(I->G, cSetting_cartoon_debug) < 1.5) |
| 250 | @@ -2048,7 +2048,7 @@ int ExtrudeCGOSurfacePolygonTaper(CExtru |
| 251 | i = I->i; |
| 252 | if (ok){ |
| 253 | int nverts = 2*I->N, pl = 0, plc = 0, damode = CGO_VERTEX_ARRAY | CGO_NORMAL_ARRAY | CGO_PICK_COLOR_ARRAY, nxtn = 3; |
| 254 | - float *vertexVals, *normalVals, *colorVals = 0, *nxtVals = 0, *tmp_ptr; |
| 255 | + float *vertexVals = NULL, *normalVals, *colorVals = 0, *nxtVals = 0, *tmp_ptr; |
| 256 | float *pickColorVals; |
| 257 | if (color_override) |
| 258 | ok &= CGOColorv(cgo, color_override); |
| 259 | @@ -2156,7 +2156,7 @@ int ExtrudeCGOSurfaceStrand(CExtrude * I |
| 260 | float *v; |
| 261 | float *n; |
| 262 | float *c; |
| 263 | - float *sv, *sn, *tv, *tn, *tv1, *tn1, *TV, *TN; |
| 264 | + float *sv, *sn, *tv, *tn, *tv1, *tn1, *TV, *TN = NULL; |
| 265 | float v0[3], n0[3], s0[3], z[3] = { 1.0, 0.0, 1.0 }; |
| 266 | int subN; |
| 267 | int ok = true; |
| 268 | Index: layer1/Scene.c |
| 269 | =================================================================== |
| 270 | --- layer1/Scene.c (revision 4039) |
| 271 | +++ layer1/Scene.c (working copy) |
| 272 | @@ -7640,7 +7640,7 @@ void SceneUpdate(PyMOLGlobals * G, int f |
| 273 | /* update all gadgets first (single-threaded since they're thread-unsafe) */ |
| 274 | rec = NULL; |
| 275 | while(ListIterate(I->Obj, rec, next)) { |
| 276 | - if((rec->obj->type == cObjectGadget)) { |
| 277 | + if(rec->obj->type == cObjectGadget) { |
| 278 | if(rec->obj->fUpdate) |
| 279 | rec->obj->fUpdate(rec->obj); |
| 280 | } |
| 281 | Index: layer1/Control.c |
| 282 | =================================================================== |
| 283 | --- layer1/Control.c (revision 4039) |
| 284 | +++ layer1/Control.c (working copy) |
| 285 | @@ -637,7 +637,7 @@ static void ControlDraw(Block * block OR |
| 286 | but_bottom = y - (cControlBoxSize - 1); |
| 287 | but_height = cControlBoxSize; |
| 288 | |
| 289 | - if((but_num == I->Active)) { |
| 290 | + if(but_num == I->Active) { |
| 291 | draw_button(but_left, but_bottom, |
| 292 | but_width, but_height, lightEdge, darkEdge, pushed ORTHOCGOARGVAR); |
| 293 | } else if(((but_num == 6) && (SettingGetGlobal_b(G, cSetting_seq_view))) || |
| 294 | Index: layer2/RepCylBond.c |
| 295 | =================================================================== |
| 296 | --- layer2/RepCylBond.c (revision 4039) |
| 297 | +++ layer2/RepCylBond.c (working copy) |
| 298 | @@ -1998,7 +1998,7 @@ Rep *RepCylBondNew(CoordSet * cs, int st |
| 299 | I->NSPC++; |
| 300 | } |
| 301 | |
| 302 | - if(s2 && (!marked[b2]) && (!stick_ball_filter_single_atoms || (ord==1 || adjacent_atoms[a2] && adjacent_atoms[a2][0] > 1))) { |
| 303 | + if(s2 && (!marked[b2]) && (!stick_ball_filter_single_atoms || (ord==1 || (adjacent_atoms[a2] && adjacent_atoms[a2][0] > 1)))) { |
| 304 | /* just once for each atom..., if stick_ball_filter is on, then only for atoms that have more than one adjacent atom */ |
| 305 | float vdw = |
| 306 | stick_ball_ratio * ((ati2->protons == cAN_H) ? bd_radius : bd_radius_full); |
| 307 | Index: layer2/RepSphere.c |
| 308 | =================================================================== |
| 309 | --- layer2/RepSphere.c (revision 4039) |
| 310 | +++ layer2/RepSphere.c (working copy) |
| 311 | @@ -1991,8 +1991,8 @@ static void RepSphereRender(RepSphere * |
| 312 | int a; |
| 313 | SphereRec *sp = I->SP; |
| 314 | float alpha; |
| 315 | - int n_quad_verts; |
| 316 | - float radius; |
| 317 | + int n_quad_verts = 0; |
| 318 | + float radius = 0.0; |
| 319 | int ok = true; |
| 320 | short use_shader = SettingGetGlobal_b(G, cSetting_sphere_use_shader) & |
| 321 | SettingGetGlobal_b(G, cSetting_use_shaders); |
| 322 | Index: layer2/ObjectMolecule2.c |
| 323 | =================================================================== |
| 324 | --- layer2/ObjectMolecule2.c (revision 4039) |
| 325 | +++ layer2/ObjectMolecule2.c (working copy) |
| 326 | @@ -3678,7 +3678,7 @@ int ObjectMoleculeNewFromPyList(PyMOLGlo |
| 327 | #else |
| 328 | int ok = true; |
| 329 | ObjectMolecule *I = NULL; |
| 330 | - int discrete_flag; |
| 331 | + int discrete_flag = 0; |
| 332 | int ll; |
| 333 | (*result) = NULL; |
| 334 | |
| 335 | @@ -4305,7 +4305,7 @@ int ObjectMoleculeSort(ObjectMolecule * |
| 336 | register int a, b; |
| 337 | CoordSet *cs, **dcs; |
| 338 | AtomInfoType *atInfo; |
| 339 | - int *dAtmToIdx; |
| 340 | + int *dAtmToIdx = NULL; |
| 341 | int ok = true; |
| 342 | if(!I->DiscreteFlag) { /* currently, discrete objects are never sorted */ |
| 343 | int n_bytes = sizeof(int) * I->NAtom; |
| 344 | Index: layer2/RepDot.c |
| 345 | =================================================================== |
| 346 | --- layer2/RepDot.c (revision 4039) |
| 347 | +++ layer2/RepDot.c (working copy) |
| 348 | @@ -192,7 +192,7 @@ static void RepDotRender(RepDot * I, Ren |
| 349 | ok &= CGOColorv(cgo, v); |
| 350 | v += 3; |
| 351 | } |
| 352 | - /* if(normals) /* NORMALS do not get set for points |
| 353 | + /* if(normals) NORMALS do not get set for points |
| 354 | CGONormalv(cgo, v);*/ |
| 355 | v += 3; |
| 356 | if (ok) |
| 357 | @@ -210,7 +210,7 @@ static void RepDotRender(RepDot * I, Ren |
| 358 | I->shaderCGO = CGOOptimizeSpheresToVBONonIndexed(cgo, CGO_BOUNDING_BOX_SZ + CGO_DRAW_SPHERE_BUFFERS_SZ); |
| 359 | CHECKOK(ok, I->shaderCGO); |
| 360 | } else { |
| 361 | - CGO *convertcgo = CGOCombineBeginEnd(cgo, 0), *tmpCGO; |
| 362 | + CGO *convertcgo = CGOCombineBeginEnd(cgo, 0), *tmpCGO = NULL; |
| 363 | CHECKOK(ok, convertcgo); |
| 364 | if (ok) |
| 365 | tmpCGO = CGOOptimizeToVBONotIndexed(convertcgo, CGO_BOUNDING_BOX_SZ + I->N * 3 + 7); |
| 366 | @@ -344,7 +344,7 @@ Rep *RepDotDoNew(CoordSet * cs, int mode |
| 367 | float *countPtr = NULL; |
| 368 | int colorCnt, lastColor; |
| 369 | Vector3f v1; |
| 370 | - MapType *map; |
| 371 | + MapType *map = NULL; |
| 372 | SphereRec *sp = G->Sphere->Sphere[0]; |
| 373 | int ds; |
| 374 | float max_vdw = MAX_VDW; |
| 375 | Index: layer2/RepSurface.c |
| 376 | =================================================================== |
| 377 | --- layer2/RepSurface.c (revision 4039) |
| 378 | +++ layer2/RepSurface.c (working copy) |
| 379 | @@ -3304,7 +3304,7 @@ static void RepSurfaceRender(RepSurface |
| 380 | if (ok) |
| 381 | convertcgo->use_shader = true; |
| 382 | } else if (I->Type == 2) { |
| 383 | - CGO *convertcgo2, *simple; |
| 384 | + CGO *convertcgo2, *simple = NULL; |
| 385 | convertcgo2 = CGOConvertLinesToShaderCylinders(I->shaderCGO, 0); |
| 386 | CHECKOK(ok, convertcgo2); |
| 387 | if (ok) |
| 388 | @@ -4503,7 +4503,7 @@ static int SurfaceJobRun(PyMOLGlobals * |
| 389 | } |
| 390 | ok &= !G->Interrupt; |
| 391 | if(ok) { |
| 392 | - MapType *map, *solv_map; |
| 393 | + MapType *map, *solv_map = NULL; |
| 394 | map = MapNewFlagged(G, I->maxVdw + probe_rad_more, |
| 395 | I->coord, VLAGetSize(I->coord) / 3, NULL, NULL); |
| 396 | CHECKOK(ok, map); |
| 397 | @@ -5747,7 +5747,7 @@ static SolventDot *SolventDotNew(PyMOLGl |
| 398 | SurfaceJobAtomInfo *j_atom_info = atom_info + j; |
| 399 | if(j > a) /* only check if this is atom trails */ |
| 400 | if((!present) || present[j]) { |
| 401 | - if((j_atom_info->vdw == a_atom_info->vdw)) { /* handle singularities */ |
| 402 | + if(j_atom_info->vdw == a_atom_info->vdw) { /* handle singularities */ |
| 403 | float *v1 = coord + 3 * j; |
| 404 | if((v0[0] == v1[0]) && (v0[1] == v1[1]) && (v0[2] == v1[2])) |
| 405 | skip_flag = true; |
| 406 | @@ -5842,7 +5842,7 @@ static SolventDot *SolventDotNew(PyMOLGl |
| 407 | SurfaceJobAtomInfo *j_atom_info = atom_info + j; |
| 408 | if(j > a) /* only check if this is atom trails */ |
| 409 | if((!present) || present[j]) { |
| 410 | - if((j_atom_info->vdw == a_atom_info->vdw)) { /* handle singularities */ |
| 411 | + if(j_atom_info->vdw == a_atom_info->vdw) { /* handle singularities */ |
| 412 | float *v2 = coord + 3 * j; |
| 413 | if((v0[0] == v2[0]) && (v0[1] == v2[1]) && (v0[2] == v2[2])) |
| 414 | skip_flag = true; |
| 415 | @@ -6002,7 +6002,7 @@ static SolventDot *SolventDotNew(PyMOLGl |
| 416 | SurfaceJobAtomInfo *j_atom_info = atom_info + j; |
| 417 | if(j > a) /* only check if this is atom trails */ |
| 418 | if((!present) || present[j]) { |
| 419 | - if((j_atom_info->vdw == a_atom_info->vdw)) { /* handle singularities */ |
| 420 | + if(j_atom_info->vdw == a_atom_info->vdw) { /* handle singularities */ |
| 421 | float *v1 = coord + 3 * j; |
| 422 | if((v0[0] == v1[0]) && (v0[1] == v1[1]) && (v0[2] == v1[2])) |
| 423 | skip_flag = true; |
| 424 | Index: layer2/RepCartoon.c |
| 425 | =================================================================== |
| 426 | --- layer2/RepCartoon.c (revision 4039) |
| 427 | +++ layer2/RepCartoon.c (working copy) |
| 428 | @@ -2615,7 +2615,7 @@ CGO *GenerateRepCartoonCGO(CoordSet *cs, |
| 429 | |
| 430 | #ifdef _PYMOL_CGO_DRAWARRAYS |
| 431 | int nverts = nAt * 4, pl = 0; |
| 432 | - float *vertexVals, *tmp_ptr; |
| 433 | + float *vertexVals = NULL, *tmp_ptr; |
| 434 | if (ok) |
| 435 | vertexVals = CGODrawArrays(cgo, GL_LINES, CGO_VERTEX_ARRAY, nverts); |
| 436 | CHECKOK(ok, vertexVals); |
| 437 | Index: layer2/ObjectMolecule.c |
| 438 | =================================================================== |
| 439 | --- layer2/ObjectMolecule.c (revision 4039) |
| 440 | +++ layer2/ObjectMolecule.c (working copy) |
| 441 | @@ -1448,7 +1448,7 @@ CoordSet *ObjectMoleculeTOPStr2CoordSet( |
| 442 | int NPHIH, MPHIA, NHPARM, NPARM, NNB, NRES; |
| 443 | int NBONA, NTHETA, NPHIA, NUMBND, NUMANG, NPTRA; |
| 444 | int NATYP, NPHB, IFPERT, NBPER, NGPER, NDPER; |
| 445 | - int MBPER, MGPER, MDPER, IFBOX, NMXRS, IFCAP; |
| 446 | + int MBPER, MGPER, MDPER, IFBOX = 0, NMXRS, IFCAP; |
| 447 | int NEXTRA, IPOL = 0; |
| 448 | int wid, col; |
| 449 | float BETA; |
| 450 | @@ -2076,7 +2076,7 @@ CoordSet *ObjectMoleculeTOPStr2CoordSet( |
| 451 | |
| 452 | if(IFBOX > 0) { |
| 453 | |
| 454 | - int IPTRES, NSPM, NSPSOL; |
| 455 | + int IPTRES, NSPM = 0, NSPSOL; |
| 456 | |
| 457 | if(amber7) { |
| 458 | p = findflag(G, buffer, "SOLVENT_POINTERS", "3I8"); |
| 459 | @@ -4431,7 +4431,7 @@ int ObjectMoleculeAttach(ObjectMolecule |
| 460 | AtomInfoType *ai; |
| 461 | int n, nn; |
| 462 | float v[3], v0[3], d; |
| 463 | - CoordSet *cs; |
| 464 | + CoordSet *cs = NULL; |
| 465 | int ok = true; |
| 466 | |
| 467 | ok &= ObjectMoleculeUpdateNeighbors(I); |
| 468 | @@ -9755,7 +9755,7 @@ int ObjectMoleculeMerge(ObjectMolecule * |
| 469 | CoordSet * cs, int bondSearchFlag, int aic_mask, int invalidate) |
| 470 | { |
| 471 | PyMOLGlobals *G = I->Obj.G; |
| 472 | - int *index, *outdex, *a2i, *i2a; |
| 473 | + int *index, *outdex, *a2i, *i2a = NULL; |
| 474 | BondType *bond = NULL; |
| 475 | register int a, b, lb = 0, ac; |
| 476 | int c, nb, a1, a2; |
| 477 | @@ -10539,7 +10539,7 @@ void ObjectMoleculeSeleOp(ObjectMolecule |
| 478 | rms = MatrixFitRMSTTTf(G, op->nvv1, op->vv1, vt, NULL, op->ttt); |
| 479 | else |
| 480 | rms = MatrixGetRMS(G, op->nvv1, op->vv1, vt, NULL); |
| 481 | - if((op->i1 == 2)) { |
| 482 | + if(op->i1 == 2) { |
| 483 | ObjectMoleculeTransformTTTf(I, op->ttt, b); |
| 484 | |
| 485 | if(op->i3) { |
| 486 | Index: layer3/Selector.c |
| 487 | =================================================================== |
| 488 | --- layer3/Selector.c (revision 4039) |
| 489 | +++ layer3/Selector.c (working copy) |
| 490 | @@ -8615,11 +8615,11 @@ static int SelectorSelect0(PyMOLGlobals |
| 491 | for(a = cNDummyAtoms; a < I->NAtom; a++) { |
| 492 | b = i_obj[i_table[a].model]->AtomInfo[i_table[a].atom].protons; |
| 493 | base[0].sele[a] = ( |
| 494 | - b > 2 && b < 5 || |
| 495 | - b > 10 && b < 14 || |
| 496 | - b > 18 && b < 32 || |
| 497 | - b > 36 && b < 51 || |
| 498 | - b > 54 && b < 85 || |
| 499 | + (b > 2 && b < 5) || |
| 500 | + (b > 10 && b < 14) || |
| 501 | + (b > 18 && b < 32) || |
| 502 | + (b > 36 && b < 51) || |
| 503 | + (b > 54 && b < 85) || |
| 504 | b > 86); |
| 505 | } |
| 506 | break; |
| 507 | Index: layer3/Executive.c |
| 508 | =================================================================== |
| 509 | --- layer3/Executive.c (revision 4039) |
| 510 | +++ layer3/Executive.c (working copy) |
| 511 | @@ -15915,7 +15915,7 @@ static int ExecutiveDrag(Block * block, |
| 512 | ExecutiveSpecSetVisibility(G, rec, true, mod, false); |
| 513 | I->LastChanged = rec; |
| 514 | } |
| 515 | - if((mod == (cOrthoSHIFT | cOrthoCTRL))) { |
| 516 | + if(mod == (cOrthoSHIFT | cOrthoCTRL)) { |
| 517 | if(rec != I->LastZoomed) |
| 518 | ExecutiveWindowZoom(G, rec->name, 0.0F, -1, false, -1.0F, |
| 519 | true); |
| 520 | Index: layer3/PlugIOManager.c |
| 521 | =================================================================== |
| 522 | --- layer3/PlugIOManager.c (revision 4039) |
| 523 | +++ layer3/PlugIOManager.c (working copy) |
| 524 | @@ -225,7 +225,7 @@ int PlugIOManagerLoadTraj(PyMOLGlobals * |
| 525 | ENDFB(G); |
| 526 | } |
| 527 | |
| 528 | - if(stop > 0 && cnt >= stop || max > 0 && ncnt >= max) { |
| 529 | + if((stop > 0 && cnt >= stop) || (max > 0 && ncnt >= max)) { |
| 530 | cs = NULL; |
| 531 | break; |
| 532 | } |
| 533 | Index: layer4/Cmd.c |
| 534 | =================================================================== |
| 535 | --- layer4/Cmd.c (revision 4039) |
| 536 | +++ layer4/Cmd.c (working copy) |
| 537 | @@ -1846,7 +1846,7 @@ static PyObject *CmdMapHalve(PyObject * |
| 538 | static PyObject *CmdGetRenderer(PyObject * self, PyObject * args) |
| 539 | { |
| 540 | PyMOLGlobals *G = NULL; |
| 541 | - char *vendor, *renderer, *version; |
| 542 | + char *vendor = NULL, *renderer = NULL, *version = NULL; |
| 543 | int ok = false; |
| 544 | ok = PyArg_ParseTuple(args, "O", &self); |
| 545 | if(ok) { |
| 546 | Index: contrib/uiuc/plugins/molfile_plugin/src/pbeqplugin.cpp |
| 547 | =================================================================== |
| 548 | --- contrib/uiuc/plugins/molfile_plugin/src/pbeqplugin.cpp (revision 4039) |
| 549 | +++ contrib/uiuc/plugins/molfile_plugin/src/pbeqplugin.cpp (working copy) |
| 550 | @@ -259,7 +259,7 @@ static int read_pbeq_data(void *v, int s |
| 551 | int addr = z*nclx*ncly + y*nclx + x; |
| 552 | if (fread(datablock + addr, 4, 1, fd) != 1) { |
| 553 | printf("pbeqplugin) Error reading potential map cell: %d,%d,%d\n", x, y, z); |
| 554 | - printf("pbeqplugin) offset: %d\n", ftell(fd)); |
| 555 | + printf("pbeqplugin) offset: %ld\n", ftell(fd)); |
| 556 | return MOLFILE_ERROR; |
| 557 | } |
| 558 | count++; |
| 559 | Index: contrib/uiuc/plugins/molfile_plugin/src/moldenplugin.c |
| 560 | =================================================================== |
| 561 | --- contrib/uiuc/plugins/molfile_plugin/src/moldenplugin.c (revision 4039) |
| 562 | +++ contrib/uiuc/plugins/molfile_plugin/src/moldenplugin.c (working copy) |
| 563 | @@ -99,7 +99,7 @@ static void *open_molden_read(const char |
| 564 | const char *filetype, |
| 565 | int *natoms) { |
| 566 | FILE *fd; |
| 567 | - qmdata_t *data; |
| 568 | + qmdata_t *data = NULL; |
| 569 | moldendata_t *moldendata; |
| 570 | char buffer[1024]; |
| 571 | char keystring[20]; |
| 572 | Index: contrib/uiuc/plugins/molfile_plugin/src/gamessplugin.c |
| 573 | =================================================================== |
| 574 | --- contrib/uiuc/plugins/molfile_plugin/src/gamessplugin.c (revision 4039) |
| 575 | +++ contrib/uiuc/plugins/molfile_plugin/src/gamessplugin.c (working copy) |
| 576 | @@ -375,7 +375,7 @@ static void *open_gamess_read(const char |
| 577 | const char *filetype, int *natoms) { |
| 578 | |
| 579 | FILE *fd; |
| 580 | - qmdata_t *data; |
| 581 | + qmdata_t *data = NULL; |
| 582 | gmsdata *gms; |
| 583 | |
| 584 | /* open the input file */ |
| 585 | Index: contrib/uiuc/plugins/molfile_plugin/src/maeffplugin.cpp |
| 586 | =================================================================== |
| 587 | --- contrib/uiuc/plugins/molfile_plugin/src/maeffplugin.cpp (revision 4039) |
| 588 | +++ contrib/uiuc/plugins/molfile_plugin/src/maeffplugin.cpp (working copy) |
| 589 | @@ -1983,7 +1983,7 @@ namespace { |
| 590 | } |
| 591 | } |
| 592 | catch (std::exception &e) { |
| 593 | - fprintf(stderr, e.what()); |
| 594 | + fprintf(stderr, "%s", e.what()); |
| 595 | return MOLFILE_ERROR; |
| 596 | } |
| 597 | return MOLFILE_SUCCESS; |
| 598 | Index: contrib/uiuc/plugins/molfile_plugin/src/graspplugin.cpp |
| 599 | =================================================================== |
| 600 | --- contrib/uiuc/plugins/molfile_plugin/src/graspplugin.cpp (revision 4039) |
| 601 | +++ contrib/uiuc/plugins/molfile_plugin/src/graspplugin.cpp (working copy) |
| 602 | @@ -104,7 +104,7 @@ void Get_Property_Values(GRASSP *grassp, |
| 603 | |
| 604 | ///ojo aqui le quite el ! |
| 605 | if ((grassp->flag)!=POTENTIALS) { |
| 606 | - if (index >=0 && index <= 4) |
| 607 | + if (index <= 4) |
| 608 | printf("graspplugin) No data available for '%s' option\n", name[index]); |
| 609 | else |
| 610 | printf("graspplugin) out of range property, flag: %d index: %d\n", grassp->flag, index); |
| 611 | Index: modules/cealign/src/tnt/tnt_fortran_array1d.h |
| 612 | =================================================================== |
| 613 | --- modules/cealign/src/tnt/tnt_fortran_array1d.h (revision 4039) |
| 614 | +++ modules/cealign/src/tnt/tnt_fortran_array1d.h (working copy) |
| 615 | @@ -221,7 +221,7 @@ inline Fortran_Array1D<T> Fortran_Array1 |
| 616 | #ifdef TNT_DEBUG |
| 617 | std::cout << "entered subarray. \n"; |
| 618 | #endif |
| 619 | - if ((i0 > 0) && (i1 < n_) || (i0 <= i1)) |
| 620 | + if (((i0 > 0) && (i1 < n_)) || (i0 <= i1)) |
| 621 | { |
| 622 | Fortran_Array1D<T> X(*this); /* create a new instance of this array. */ |
| 623 | X.n_ = i1-i0+1; |
| 624 | Index: modules/cealign/src/tnt/tnt_array1d.h |
| 625 | =================================================================== |
| 626 | --- modules/cealign/src/tnt/tnt_array1d.h (revision 4039) |
| 627 | +++ modules/cealign/src/tnt/tnt_array1d.h (working copy) |
| 628 | @@ -258,7 +258,7 @@ inline int Array1D<T>::ref_count() const |
| 629 | template <class T> |
| 630 | inline Array1D<T> Array1D<T>::subarray(int i0, int i1) |
| 631 | { |
| 632 | - if ((i0 >= 0) && (i1 < n_) || (i0 <= i1)) |
| 633 | + if (((i0 >= 0) && (i1 < n_)) || (i0 <= i1)) |
| 634 | { |
| 635 | Array1D<T> X(*this); /* create a new instance of this array. */ |
| 636 | X.n_ = i1-i0+1; |