IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 34044


Ignore:
Timestamp:
Jun 20, 2012, 6:58:23 AM (14 years ago)
Author:
eugene
Message:

fixes to address compile time errors due to pedantic gcc warnings

Location:
branches/eam_branches/ipp-20120601/psModules/src
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20120601/psModules/src/camera/pmFPAMosaic.c

    r28007 r34044  
    661661            good = false;
    662662        }
     663    }
     664    if (!good) {
     665        // XXX do something to address this?
    663666    }
    664667
  • branches/eam_branches/ipp-20120601/psModules/src/camera/pmFPARead.c

    r27346 r34044  
    957957        trimsec->y1 = naxis2 + trimsec->y1;
    958958
    959     int maxSize;                        // Number of cols,rows in image
    960     if (readdir == 1) {
    961         maxSize = PS_MIN(naxis2, trimsec->y1 - trimsec->y0);
    962     } else {
    963         maxSize = PS_MIN(naxis1, trimsec->x1 - trimsec->x0);
    964     }
     959    // XX not used int maxSize;                        // Number of cols,rows in image
     960    // XX not used if (readdir == 1) {
     961    // XX not used     maxSize = PS_MIN(naxis2, trimsec->y1 - trimsec->y0);
     962    // XX not used } else {
     963    // XX not used     maxSize = PS_MIN(naxis1, trimsec->x1 - trimsec->x0);
     964    // XX not used }
    965965
    966966    int offset;                         // start of the segment
  • branches/eam_branches/ipp-20120601/psModules/src/camera/pmFPAfileDefine.c

    r31633 r34044  
    333333        psMetadataItem *fuzz = psMetadataLookup(scheme, "FUZZ"); // Quantisation fuzz?
    334334        if (fuzz) {
    335             if (fuzz->type != PS_TYPE_BOOL) {
     335            if (fuzz->type != PS_DATA_BOOL) {
    336336                psWarning("FUZZ in compression scheme %s isn't boolean.", fitsType);
    337337                goto FITS_OPTIONS_DONE;
  • branches/eam_branches/ipp-20120601/psModules/src/camera/pmReadoutFake.c

    r33624 r34044  
    332332#define CONCEPT_SET_S32(CONCEPTS, NAME, OLD, NEW) { \
    333333        psMetadataItem *item = psMetadataLookup(CONCEPTS, NAME); \
    334         psAssert(item->type == PS_TYPE_S32, "Incorrect type: %x", item->type); \
     334        psAssert(item->type == PS_DATA_S32, "Incorrect type: %x", item->type); \
    335335        if (item->data.S32 == OLD) { \
    336336            item->data.S32 = NEW; \
  • branches/eam_branches/ipp-20120601/psModules/src/concepts/pmConceptsStandard.c

    r32941 r34044  
    118118    assert(concept);
    119119    assert(cell);
    120     assert(concept->type == PS_TYPE_F32);
     120    assert(concept->type == PS_DATA_F32);
    121121
    122122    float rn = concept->data.F32;       // Read noise
     
    930930    psFree(timesysName);
    931931
    932     if (!item || item->type != PS_TYPE_S32) {
     932    if (!item || item->type != PS_DATA_S32) {
    933933        psWarning("Unable to find %s --- assuming UTC", timesysName);
    934934        return PS_TIME_UTC;
     
    12581258#endif
    12591259      default:
    1260         if (concept->type == PS_TYPE_F32 && concept->data.F32 - (int)concept->data.F32 == 0) {
     1260        if (concept->type == PS_DATA_F32 && concept->data.F32 - (int)concept->data.F32 == 0) {
    12611261            offset = concept->data.F32;
    1262         } else if (concept->type == PS_TYPE_F64 && concept->data.F64 - (int)concept->data.F64 == 0) {
     1262        } else if (concept->type == PS_DATA_F64 && concept->data.F64 - (int)concept->data.F64 == 0) {
    12631263            offset = concept->data.F64;
    12641264        } else {
     
    15581558    assert(cameraFormat);
    15591559
    1560     if (concept->type != PS_TYPE_S32) {
     1560    if (concept->type != PS_DATA_S32) {
    15611561        psError(PS_ERR_UNKNOWN, true, "Concept %s is not of type S32, as expected.\n", concept->name);
    15621562        return NULL;
  • branches/eam_branches/ipp-20120601/psModules/src/concepts/pmConceptsUpdate.c

    r20095 r34044  
    3030            if (isfinite(gain)) {
    3131                psMetadataItem *rn = psMetadataLookup(cell->concepts, "CELL.READNOISE"); // Read noise
    32                 psAssert(rn && rn->type == PS_TYPE_F32, "Should be of the correct type");
     32                psAssert(rn && rn->type == PS_DATA_F32, "Should be of the correct type");
    3333                rn->data.F32 *= gain;
    3434                psMetadataRemoveKey(cell->concepts, "CELL.READNOISE.UPDATE");
  • branches/eam_branches/ipp-20120601/psModules/src/config/pmConfigCommand.c

    r18937 r34044  
    4242    psMetadataItem *item;               // Item from iteration
    4343    while ((item = psMetadataGetAndIncrement(iter))) {
    44         assert(item->type == PS_TYPE_S32);
     44        assert(item->type == PS_DATA_S32);
    4545        psStringAppend(command, " -trace %s %d", item->name, item->data.S32);
    4646    }
  • branches/eam_branches/ipp-20120601/psModules/src/detrend/pmNonLinear.c

    r29935 r34044  
    8282    }
    8383    PS_ASSERT_PTR_NON_NULL(outFlux,NULL);
    84     psS32 tableSize = inFlux->n;
     84    // XXX unused psS32 tableSize = inFlux->n;
    8585    if (inFlux->n != outFlux->n) {
    86         tableSize = PS_MIN(inFlux->n, outFlux->n);
     86        // XXX unused tableSize = PS_MIN(inFlux->n, outFlux->n);
    8787        psLogMsg(__func__, PS_LOG_WARN,
    8888                 "WARNING: pmNonLinear.c: pmNonLinearityLookup(): "
  • branches/eam_branches/ipp-20120601/psModules/src/detrend/pmShutterCorrection.c

    r33089 r34044  
    406406
    407407    // Check input sizes, generate first-pass statistics
    408     psRegion refRegion;                 // Reference region
    409408    psVector *refs = psVectorAlloc(num, PS_TYPE_F32); // Reference measurements
    410409    psVectorInit(refs, 0);
     
    441440            numCols = image->numCols;
    442441            // define the reference region : a box of size 'size' at the center
    443             refRegion = psRegionForSquare(0.5 * numCols, 0.5 * numRows, size);
     442            // XXX unused psRegion refRegion = psRegionForSquare(0.5 * numCols, 0.5 * numRows, size);
    444443            // Set up the sample regions : boxes of size 'size' at the 4 image corners
    445444            for (int j = 0; j < MEASURE_SAMPLES; j++) {
  • branches/eam_branches/ipp-20120601/psModules/src/extras/pmVisualUtils.c

    r31373 r34044  
    424424            nwritten = fwrite (line, 1, strlen(line), output);
    425425        }
     426        if (nwritten < 1) {
     427        }
    426428    }
    427429
  • branches/eam_branches/ipp-20120601/psModules/src/objects/pmSource.c

    r33963 r34044  
    10981098        if (!addNoise && !addModelVar) source->tmpFlags |= PM_SOURCE_TMPF_SUBTRACTED;
    10991099    }
     1100    if (!status) {
     1101        // XXX maybe raise an error or warning?
     1102    }
    11001103
    11011104    return true;
     
    11661169        status = pmModelSubWithOffset (target, source->maskObj, model, mode, maskVal, dx, dy);
    11671170    }
     1171    if (!status) {
     1172        // XXX raise an error or warning?
     1173    }
    11681174
    11691175    // restore original values
     
    12531259    } else {
    12541260        status = pmModelSubWithOffset (target, source->maskObj, model, mode, maskVal, dx, dy);
     1261    }
     1262    if (!status) {
     1263        // XXX raise an error or warning?
    12551264    }
    12561265
  • branches/eam_branches/ipp-20120601/psModules/src/objects/pmSourceIO_CMP.c

    r32347 r34044  
    6565    int i, type;
    6666    // psMetadataItem *mdi;
    67     psF32 *PAR, *dPAR;
     67    psF32 *PAR;
    6868    float lsky = 0;
    6969    bool status;
     
    130130
    131131        PAR = model->params->data.F32;
    132         dPAR = model->dparams->data.F32;
    133132
    134133        type = pmSourceGetDophotType (source);
     
    174173    bool status;
    175174    int Ninstar;
    176     psF32 *PAR, *dPAR;
     175    psF32 *PAR;
    177176    psEllipseAxes axes;
    178177
     
    273272
    274273            PAR = source->modelPSF->params->data.F32;
    275             dPAR = source->modelPSF->dparams->data.F32;
    276274
    277275            PAR[PM_PAR_SKY] = pow (atof (array->data[5]), 10.0);
  • branches/eam_branches/ipp-20120601/psModules/src/objects/pmSourceIO_PS1_CAL_0.c

    r32347 r34044  
    322322}
    323323
     324# define WRITE_AP_DATA 0
     325
    324326bool pmSourcesWrite_PS1_CAL_0_XSRC (psFits *fits, pmReadout *readout, psArray *sources, psMetadata *imageHeader, char *extname, psMetadata *recipe)
    325327{
     
    338340    }
    339341
     342# if (WRITE_AP_DATA)
    340343    bool calMags = false;
    341344    bool status1 = false;
     
    350353        calMags = true;
    351354    }
     355# endif
    352356
    353357    // create a header to hold the output data
     
    424428        psMetadataAdd (row, PS_LIST_TAIL, "Y_EXT_SIG",        PS_DATA_F32, "Sigma in EXT y coordinate",                  yErr);
    425429
    426 # if (0)
     430# if (WRITE_AP_DATA)
    427431        // Petrosian measurements
    428432        // XXX insert header data: petrosian ref radius, flux ratio
  • branches/eam_branches/ipp-20120601/psModules/src/objects/pmSourceIO_SMPDATA.c

    r32347 r34044  
    6363    psMetadata *row;
    6464    int i;
    65     psF32 *PAR, *dPAR;
     65    psF32 *PAR;
    6666    bool status;
    6767    psEllipseAxes axes;
     
    8585        if (model != NULL) {
    8686            PAR = model->params->data.F32;
    87             dPAR = model->dparams->data.F32;
    8887            xPos = PAR[PM_PAR_XPOS];
    8988            yPos = PAR[PM_PAR_YPOS];
     
    145144
    146145    bool status;
    147     psF32 *PAR, *dPAR;
     146    psF32 *PAR;
    148147    psEllipseAxes axes;
    149148    float lsky;
     
    176175
    177176        PAR = model->params->data.F32;
    178         dPAR = model->dparams->data.F32;
    179177
    180178        psMetadata *row = table->data[i];
  • branches/eam_branches/ipp-20120601/psModules/src/objects/pmSourceIO_SX.c

    r32347 r34044  
    5656    PS_ASSERT_PTR_NON_NULL(filename, false);
    5757
    58     psF32 *PAR, *dPAR;
     58    psF32 *PAR;
    5959    psEllipseAxes axes;
    6060
     
    7777
    7878        PAR = model->params->data.F32;
    79         dPAR = model->dparams->data.F32;
    8079
    8180        // pmSourceSextractType (source, &type, &flags);
Note: See TracChangeset for help on using the changeset viewer.