Changeset 13758


Ignore:
Timestamp:
10/19/12 17:27:45 (12 years ago)
Author:
Mathieu Morlighem
Message:

CHG: some cleanup from cppcheck

Location:
issm/trunk-jpl/src/c/shared
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/shared/Elements/Paterson.cpp

    r13622 r13758  
    6060                B=pow((IssmPDouble)10,(IssmPDouble)8)*(-0.003748937622487*pow(T+5,3)+0.015290593619213*pow(T+5,2)  -0.048160403003748*(T+5)+  0.854987973338348);
    6161        }
    62         else if(T>=-2.0){
     62        else{
    6363                B=pow((IssmPDouble)10,(IssmPDouble)8)*(-0.003748937622488*pow(T+2,3)-0.018449844983174*pow(T+2,2)  -0.057638157095631*(T+2)+  0.746900791092860);
    6464        }
  • issm/trunk-jpl/src/c/shared/Elements/PddSurfaceMassBalance.cpp

    r13622 r13758  
    1010  IssmDouble B;    // surface mass balance, melt+accumulation
    1111
    12   int    iqj,imonth, j;
     12  int    iqj,imonth;
    1313
    1414  IssmDouble saccu;     // yearly surface accumulation
     
    2020  IssmDouble sconv; //rhow_rain/rhoi / 12 months
    2121
    22   IssmDouble density;
    2322  IssmDouble lapser=6.5/1000., sealev=0.;    // lapse rate. degrees per meter. 7.5 lev's 99 paper, 9 Marshall 99 paper
    2423  IssmDouble desfac = 0.5;                 // desert elevation factor
  • issm/trunk-jpl/src/c/shared/Elements/TransformLoadVectorCoord.cpp

    r13056 r13758  
    2020void TransformLoadVectorCoord(ElementVector* pe,Node** nodes,int numnodes,int* cs_array){
    2121
    22         int     i,j;
     22        int     i;
    2323        int     numdofs   = 0;
    2424        IssmDouble *transform = NULL;
  • issm/trunk-jpl/src/c/shared/Elements/TransformSolutionCoord.cpp

    r13056 r13758  
    2121void TransformSolutionCoord(IssmDouble* solution,Node** nodes,int numnodes,int* cs_array){
    2222
    23         int     i,j;
     23        int     i;
    2424        int     numdofs   = 0;
    2525        IssmDouble *transform = NULL;
  • issm/trunk-jpl/src/c/shared/Exceptions/exprintf.cpp

    r13622 r13758  
    1616        char *buffer = NULL;
    1717        int   n,size = 100;
    18         int   string_size;
    1918
    2019        //variable list of arguments
  • issm/trunk-jpl/src/c/shared/Exp/IsInPolySerial.cpp

    r13622 r13758  
    99int IsInPolySerial(double* in,double* xc,double* yc,int numvertices,double* x,double* y,int nods, int edgevalue){
    1010
    11         int i,j;
    1211        double x0,y0;
    1312
    1413        /*Go through all vertices of the mesh:*/
    15         for (i=0;i<nods;i++){
     14        for(int i=0;i<nods;i++){
    1615                if (in[i]){
    1716                        /*this vertex already is inside one of the contours, continue*/
  • issm/trunk-jpl/src/c/shared/Exp/exp.h

    r13623 r13758  
    9090        nprof=1;
    9191        for(;;){
    92                 fscanf(fid,"%256s %256s\n",chardummy,chardummy);
    93                 fscanf(fid,"%256s %256s\n",chardummy,chardummy);
    94                 fscanf(fid,"%256s %256s %256s %256s\n",chardummy,chardummy,chardummy,chardummy);
    95                 fscanf(fid,"%20u %256s\n",&n,chardummy);
    96                 fscanf(fid,"%256s %256s %256s %256s %256s\n",chardummy,chardummy,chardummy,chardummy,chardummy);
     92                fscanf(fid,"%255s %255s\n",chardummy,chardummy);
     93                fscanf(fid,"%255s %255s\n",chardummy,chardummy);
     94                fscanf(fid,"%255s %255s %255s %255s\n",chardummy,chardummy,chardummy,chardummy);
     95                fscanf(fid,"%20u %255s\n",&n,chardummy);
     96                fscanf(fid,"%255s %255s %255s %255s %255s\n",chardummy,chardummy,chardummy,chardummy,chardummy);
    9797                for (i=0;i<n;i++) fscanf(fid,"%20lf %20lf\n",&ddummy,&ddummy);
    9898                /*check whether we are at the end of the file, otherwise, keep reading next profile:*/
     
    118118
    119119                /*Skip header: */
    120                 fscanf(fid,"%256s %256s\n",chardummy,chardummy);
    121                 fscanf(fid,"%256s %256s\n",chardummy,chardummy);
    122                 fscanf(fid,"%256s %256s %256s %256s\n",chardummy,chardummy,chardummy,chardummy);
     120                fscanf(fid,"%255s %255s\n",chardummy,chardummy);
     121                fscanf(fid,"%255s %255s\n",chardummy,chardummy);
     122                fscanf(fid,"%255s %255s %255s %255s\n",chardummy,chardummy,chardummy,chardummy);
    123123
    124124                /*Get number of profile vertices: */
    125                 fscanf(fid,"%20u %256s\n",&n,chardummy);
     125                fscanf(fid,"%20u %255s\n",&n,chardummy);
    126126
    127127                /*Skip next line: */
    128                 fscanf(fid,"%256s %256s %256s %256s %256s\n",chardummy,chardummy,chardummy,chardummy,chardummy);
     128                fscanf(fid,"%255s %255s %255s %255s %255s\n",chardummy,chardummy,chardummy,chardummy,chardummy);
    129129
    130130                /*Allocate vertices: */
  • issm/trunk-jpl/src/c/shared/Numerics/XZvectorsToCoordinateSystem.cpp

    r12529 r13758  
    77void XZvectorsToCoordinateSystem(IssmDouble* T,IssmDouble* xzvectors){
    88
    9         int             i,j;
    109        IssmDouble      x[3],y[3],z[3];
    1110        IssmDouble      x_norm, y_norm, z_norm;
    1211
    13         for(i=0;i<6;i++){
     12        for(int i=0;i<6;i++){
    1413                if(xIsNan<IssmDouble>(xzvectors[i])){
    1514                        /*At least one NaN found: default to Id*/
Note: See TracChangeset for help on using the changeset viewer.