IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 34089


Ignore:
Timestamp:
Jun 26, 2012, 11:47:13 AM (14 years ago)
Author:
eugene
Message:

changes to support pedantic gcc warnings; add configure option for debug-build and no-as-needed

Location:
trunk
Files:
52 edited

Legend:

Unmodified
Added
Removed
  • trunk/magic/remove/configure.ac

    r26438 r34089  
    2121
    2222dnl ------------- psLib, psModules ---------------
    23 PKG_CHECK_MODULES([PSLIB],    [pslib >= 1.0.0])
    24 PKG_CHECK_MODULES([PSMODULE], [psmodules >= 1.0.0])
     23PKG_CHECK_MODULES([PSLIB],     [pslib >= 1.0.0])
     24PKG_CHECK_MODULES([PSMODULE],  [psmodules >= 1.0.0])
     25PKG_CHECK_MODULES([NEBCLIENT], [nebclient >= 0.17])
    2526
    2627dnl Set CFLAGS for build
    2728IPP_STDOPTS
    28 CFLAGS="${CFLAGS=} -Wall -Werror"
     29dnl CFLAGS="${CFLAGS=} -Wall -Werror"
    2930echo "STREAKSREMOVE_CFLAGS: $STREAKSREMOVE_CFLAGS"
    3031echo "STREAKSREMOVE_LIBS: $STREAKSREMOVE_LIBS"
  • trunk/magic/remove/src/Makefile.am

    r26890 r34089  
    2424STREAKSREMOVE_CFLAGS=-DSTREAKS_COMPRESS_OUTPUT=1
    2525
    26 STREAKSCFLAGS = $(STREAKSREMOVE_CFLAGS) $(PSMODULE_CFLAGS) $(PSLIB_CFLAGS)
    27 STREAKSLDFLAGS = $(STREAKSREMOVE_LIBS) $(PSMODULE_LIBS) $(PSLIB_LIBS)
     26STREAKSCFLAGS = $(STREAKSREMOVE_CFLAGS) $(PSMODULE_CFLAGS) $(PSLIB_CFLAGS) ${NEBCLIENT_CFLAGS}
     27STREAKSLDFLAGS = $(STREAKSREMOVE_LIBS) $(PSMODULE_LIBS) $(PSLIB_LIBS) ${NEBCLIENT_LIBS}
    2828
    2929streaksremove_CFLAGS = $(STREAKSCFLAGS)
  • trunk/magic/remove/src/streakscompare.c

    r30315 r34089  
    165165    }
    166166
     167    if (nebulousImage) { /* do something? */ }
     168
    167169    if (argc != 1) {
    168170        psString unexpectedArguments = NULL;
  • trunk/magic/remove/src/streaksio.c

    r32687 r34089  
    659659
    660660        // Ensure input is of the expected type
    661         psDataType expected = isMask ? PS_TYPE_IMAGE_MASK : PS_TYPE_F32; // Expected type for image
     661        psElemType expected = isMask ? PS_TYPE_IMAGE_MASK : PS_TYPE_F32; // Expected type for image
    662662        for (int i = 0; i < in->imagecube->n; i++) {
    663663            psImage *image = in->imagecube->data[i]; // Image of interest
  • trunk/magic/remove/src/streaksrelease.c

    r30315 r34089  
    288288    } else {
    289289        // we have an image cube
    290         double initValue;
     290        // double initValue;
    291291        if (exciseImageCube) {
    292292            // copy the entire input image to the recovery image
    293293            writeImageCube(sf->recImage, sf->inImage->imagecube, extname, sf->extnum);
    294             initValue = NAN;
     294            // initValue = NAN;
    295295        } else {
    296296            // otherwise write it to the output
    297297            writeImageCube(sf->outImage, sf->inImage->imagecube, extname, sf->extnum);
    298             initValue = 0;
     298            // initValue = 0;
    299299        }
    300300
  • trunk/pedestal/configure.ac

    r19589 r34089  
    88AM_MAINTAINER_MODE
    99
    10 IPP_STDCFLAGS
     10IPP_STDLDFLAGS
    1111
    1212AC_LANG(C)
     
    2020
    2121IPP_STDOPTS
    22 CFLAGS="${CFLAGS=} -Wall -Werror"
     22IPP_STDCFLAGS
    2323
    2424AC_CONFIG_FILES([
  • trunk/ppArith/configure.ac

    r23795 r34089  
    99AM_MAINTAINER_MODE
    1010
    11 IPP_STDCFLAGS
     11IPP_STDLDFLAGS
    1212
    1313AC_LANG(C)
     
    2424dnl Set CFLAGS for build
    2525IPP_STDOPTS
    26 CFLAGS="${CFLAGS} -Wall -Werror"
     26IPP_STDCFLAGS
    2727
    2828IPP_VERSION
  • trunk/ppBackground/configure.ac

    r28281 r34089  
    99AM_MAINTAINER_MODE
    1010
    11 IPP_STDCFLAGS
     11IPP_STDLDFLAGS
    1212
    1313AC_LANG(C)
     
    3030dnl Set CFLAGS for build
    3131IPP_STDOPTS
    32 CFLAGS="${CFLAGS} -Wall -Werror"
     32IPP_STDCFLAGS
    3333
    3434IPP_VERSION
  • trunk/ppBackground/src/ppBackgroundExit.c

    r28288 r34089  
    1010    }
    1111
    12     psErrorCode errorCode = psErrorCodeLast(); // Error code
     12    // gcc -Wswitch complains here if err is declared as type psErrorCode
     13    // the collection of ps*ErrorCode values are enums defined separately for
     14    // each module (psphot, pswarp, etc).  the lowest type, psErrorCode is only the base set and does
     15    // not include the possible psphot values
     16
     17    // for now, to get around this, we just use an int for the switch
     18
     19    // psErrorCode errorCode = psErrorCodeLast(); // Error code
     20    int errorCode = psErrorCodeLast(); // Error code
     21
    1322    if (errorCode != PS_ERR_NONE) {
    1423        pmFPAfileFreeSetStrict(false);
  • trunk/ppConfigDump/configure.ac

    r21038 r34089  
    88AM_MAINTAINER_MODE
    99
    10 IPP_STDCFLAGS
     10IPP_STDLDFLAGS
    1111
    1212AC_LANG(C)
     
    2121
    2222IPP_STDOPTS
    23 CFLAGS="${CFLAGS=} -Wall -Werror"
     23IPP_STDCFLAGS
    2424
    2525AC_CONFIG_FILES([
  • trunk/ppMerge/configure.ac

    r23800 r34089  
    88AM_MAINTAINER_MODE
    99
    10 IPP_STDCFLAGS
     10IPP_STDLDFLAGS
    1111
    1212AC_LANG(C)
     
    2424
    2525IPP_STDOPTS
    26 CFLAGS="${CFLAGS=} -Wall -Werror"
     26IPP_STDCFLAGS
    2727
    2828AC_CONFIG_FILES([
  • trunk/ppNoiseMap/configure.ac

    r24458 r34089  
    88AM_MAINTAINER_MODE
    99
    10 IPP_STDCFLAGS
     10IPP_STDLDFLAGS
    1111
    1212AC_LANG(C)
     
    2121
    2222IPP_STDOPTS
    23 CFLAGS="${CFLAGS=} -Wall -Werror"
     23IPP_STDCFLAGS
    2424
    2525IPP_VERSION
  • trunk/ppNorm/configure.ac

    r19585 r34089  
    88AM_MAINTAINER_MODE
    99
    10 IPP_STDCFLAGS
     10IPP_STDLDFLAGS
    1111
    1212AC_LANG(C)
     
    2121
    2222IPP_STDOPTS
    23 CFLAGS="${CFLAGS=} -Wall -Werror"
     23IPP_STDCFLAGS
    2424
    2525AC_CONFIG_FILES([
  • trunk/ppNorm/src/ppNormCalc.c

    r18071 r34089  
    8686        psMetadataItem *compsItem;      // Item from iteration
    8787        while ((compsItem = psMetadataGetAndIncrement(compsIter))) {
    88             if (compsItem->type != PS_TYPE_F32) {
     88            if (compsItem->type != PS_DATA_F32) {
    8989                psLogMsg("ppNormCalc", PS_LOG_WARN,
    9090                         "Component %s within exposure %s is not of type F32 --- ignored.\n",
  • trunk/ppSkycell/configure.ac

    r23982 r34089  
    99AM_MAINTAINER_MODE
    1010
    11 IPP_STDCFLAGS
     11IPP_STDLDFLAGS
    1212
    1313AC_LANG(C)
     
    2323dnl Set CFLAGS for build
    2424IPP_STDOPTS
    25 CFLAGS="${CFLAGS} -Wall -Werror"
     25IPP_STDCFLAGS
    2626
    2727IPP_VERSION
  • trunk/ppSmooth/configure.ac

    r25976 r34089  
    88AM_MAINTAINER_MODE
    99
    10 IPP_STDCFLAGS
     10IPP_STDLDFLAGS
    1111
    1212AC_LANG(C)
     
    2121
    2222IPP_STDOPTS
    23 CFLAGS="${CFLAGS=} -Wall -Werror"
     23IPP_STDCFLAGS
    2424
    2525IPP_VERSION
  • trunk/ppStack/configure.ac

    r27004 r34089  
    88AM_MAINTAINER_MODE
    99
    10 IPP_STDCFLAGS
     10IPP_STDLDFLAGS
    1111
    1212AC_LANG(C)
     
    2828
    2929IPP_STDOPTS
    30 CFLAGS="${CFLAGS=} -Wall -Werror"
     30IPP_STDCFLAGS
    3131
    3232IPP_VERSION
  • trunk/ppStack/src/ppStackConvolve.c

    r32170 r34089  
    77        psMetadataItem *item = psMetadataLookup(SOURCE->concepts, NAME); \
    88        psAssert(item, "Concept should be present");                    \
    9         psAssert(item->type == PS_TYPE_F32, "Concept should be F32");   \
     9        psAssert(item->type == PS_DATA_F32, "Concept should be F32");   \
    1010        item->data.F32 = VALUE;                                         \
    1111    }
     
    101101        if (!ppStackMatch(readout, target, options, i, config)) {
    102102            // XXX many things can cause a failure of ppStackMatch -- should some be handled differently?
    103             psErrorCode error = psErrorCodeLast(); // Error code
     103
     104            // gcc -Wswitch complains here if err is declared as type psErrorCode
     105            // the collection of ps*ErrorCode values are enums defined separately for
     106            // each module (psphot, pswarp, etc).  the lowest type, psErrorCode is only the base set and does
     107            // not include the possible psphot values
     108
     109            // for now, to get around this, we just use an int for the switch
     110
     111            // psErrorCode error = psErrorCodeLast(); // Error code
     112            int error = psErrorCodeLast(); // Error code
    104113            switch (error) {
    105114                // Fatal errors
  • trunk/ppStack/src/ppStackFinish.c

    r30620 r34089  
    4545    }
    4646
    47     psErrorCode errorCode = psErrorCodeLast(); // Error code
     47    // gcc -Wswitch complains here if err is declared as type psErrorCode
     48    // the collection of ps*ErrorCode values are enums defined separately for
     49    // each module (psphot, pswarp, etc).  the lowest type, psErrorCode is only the base set and does
     50    // not include the possible psphot values
     51
     52    // for now, to get around this, we just use an int for the switch
     53
     54    // psErrorCode errorCode = psErrorCodeLast(); // Error code
     55    int errorCode = psErrorCodeLast(); // Error code
    4856    if (errorCode == PS_ERR_NONE) {
    4957        return exitValue;
  • trunk/ppStack/src/ppStackMatch.c

    r33426 r34089  
    460460            psMetadataItem *item = NULL;// Item from iteration
    461461            while ((item = psMetadataGetAndIncrement(iter))) {
    462                 assert(item->type == PS_TYPE_F32);
     462                assert(item->type == PS_DATA_F32);
    463463                float norm = item->data.F32; // Normalisation
    464464                sum += norm;
  • trunk/ppStack/src/ppStackTarget.c

    r30620 r34089  
    191191
    192192        float norm = powf(10.0, -0.4 * options->norm->data.F32[i]); // Normalisation from stars
    193         float meanVariance = bg->robustMedian * PS_SQR(norm);       // Mean variance in normalised image
     193        float meanVariance = mean * PS_SQR(norm);       // Mean variance in normalised image
    194194
    195195        if (meanVariance < minVariance) {
  • trunk/ppSub/configure.ac

    r23803 r34089  
    99AM_MAINTAINER_MODE
    1010
    11 IPP_STDCFLAGS
     11IPP_STDLDFLAGS
    1212
    1313AC_LANG(C)
     
    3030dnl Set CFLAGS for build
    3131IPP_STDOPTS
    32 CFLAGS="${CFLAGS} -Wall -Werror"
     32IPP_STDCFLAGS
    3333
    3434IPP_VERSION
  • trunk/ppSub/src/ppSubExit.c

    r27719 r34089  
    1111    }
    1212
    13     psErrorCode errorCode = psErrorCodeLast(); // Error code
     13    // gcc -Wswitch complains here if err is declared as type psErrorCode
     14    // the collection of ps*ErrorCode values are enums defined separately for
     15    // each module (psphot, pswarp, etc).  the lowest type, psErrorCode is only the base set and does
     16    // not include the possible psphot values
     17
     18    // for now, to get around this, we just use an int for the switch
     19
     20    // psErrorCode errorCode = psErrorCodeLast(); // Error code
     21    int errorCode = psErrorCodeLast(); // Error code
    1422    if (errorCode != PS_ERR_NONE) {
    1523        pmFPAfileFreeSetStrict(false);
  • trunk/ppSub/src/ppSubMatchPSFs.c

    r32676 r34089  
    266266        if (!detections->allSources) {
    267267            psFree(detections);
    268             psErrorCode error = psErrorCodeLast(); // Error code
     268            int error = psErrorCodeLast(); // Error code
    269269            if (error == PM_ERR_OBJECTS) {
    270270                psErrorStackPrint(stderr, "Unable to match source lists");
     
    439439
    440440    if (!success) {
    441         psErrorCode error = psErrorCodeLast(); // Error code
     441        int error = psErrorCodeLast(); // Error code
    442442        if (error == PM_ERR_STAMPS) {
    443443            psErrorStackPrint(stderr, "Unable to find stamps");
     
    471471            psRegion *region = regItem->data.V; // Region of interest
    472472            psMetadataItem *modeItem = psMetadataGetAndIncrement(modeIter); // Item with mode
    473             psAssert(modeItem && modeItem->type == PS_TYPE_S32, "Expect subtraction mode");
     473            psAssert(modeItem && modeItem->type == PS_DATA_S32, "Expect subtraction mode");
    474474            pmSubtractionMode mode = modeItem->data.S32; // Subtraction mode
    475475            psMetadataItem *normItem = psMetadataGetAndIncrement(normIter); // Item with normalisation
    476             psAssert(normItem && normItem->type == PS_TYPE_F32 && isfinite(normItem->data.F32),
     476            psAssert(normItem && normItem->type == PS_DATA_F32 && isfinite(normItem->data.F32),
    477477                     "Expect normalisation");
    478478            float norm = normItem->data.F32; // Normalisation
  • trunk/ppTranslate/configure.ac

    r25923 r34089  
    1010AM_MAINTAINER_MODE
    1111
    12 IPP_STDCFLAGS
     12IPP_STDLDFLAGS
    1313
    1414AC_LANG(C)
     
    3030dnl Set CFLAGS for build
    3131IPP_STDOPTS
    32 CFLAGS="${CFLAGS} -Wall -Werror"
     32IPP_STDCFLAGS
    3333
    3434IPP_VERSION
  • trunk/ppViz/configure.ac

    r27404 r34089  
    99AM_MAINTAINER_MODE
    1010
    11 IPP_STDCFLAGS
     11IPP_STDLDFLAGS
    1212
    1313AC_LANG(C)
     
    2323dnl Set CFLAGS for build
    2424IPP_STDOPTS
    25 CFLAGS="${CFLAGS} -Wall -Werror"
     25IPP_STDCFLAGS
    2626
    2727IPP_VERSION
  • trunk/ppbgrestore/configure.ac

    r25973 r34089  
    99AM_MAINTAINER_MODE
    1010
    11 IPP_STDCFLAGS
     11IPP_STDLDFLAGS
    1212
    1313AC_LANG(C)
     
    3232dnl Set CFLAGS for build
    3333IPP_STDOPTS
    34 CFLAGS="${CFLAGS} -Wall -Werror"
     34IPP_STDCFLAGS
    3535
    3636IPP_VERSION
    37 
    38 # echo "PPSTAMP_CFLAGS: $PPSTAMP_CFLAGS"
    39 # echo "PPSTAMP_LIBS: $PPSTAMP_LIBS"
    4037
    4138AC_SUBST([PPSTAMP_CFLAGS])
  • trunk/psLib/configure.ac

    r29542 r34089  
    2727AC_SUBST(PSLIB_LT_VERSION,$PSLIB_LT_VERSION)
    2828
    29 IPP_STDCFLAGS
     29IPP_STDLDFLAGS
    3030
    3131dnl ------------------- PERL options ---------------------
     
    473473dnl ------- enable -Werror after all of the probes have run ---------
    474474IPP_STDOPTS
    475 
    476 CFLAGS="${CFLAGS} -Wall -Werror"
    477 dnl enable POSIX/XSI and C99 compliance
     475IPP_STDCFLAGS
    478476CFLAGS="${CFLAGS=} -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=200112L"
    479477
  • trunk/psLib/m4/ipp_stdopts.m4

    r23793 r34089  
    11
     2dnl IPP_STDCFLAGS must go *after* external probes (to avoid Werror confusing things)
    23AC_DEFUN([IPP_STDCFLAGS],
    34[
     5    dnl this section currently overrides a user-defined CFLAGS
    46    AC_ARG_ENABLE(optimize,
    57      [AS_HELP_STRING(--enable-optimize,enable compiler optimization)],
     
    1214      ]
    1315    )
     16    dnl this section accepts a user-defined CFLAGS, and sets CFLAGS to the empty string if not present
     17    AC_ARG_ENABLE(debug-build,
     18      [AS_HELP_STRING(--enable-debug-build,enable debug build: ie disable Werror)],
     19      [AC_MSG_RESULT(debug build enabled)
     20        if test x"${CFLAGS}" == x; then
     21          CFLAGS="-Wall"
     22        else
     23          CFLAGS="${CFLAGS=} -Wall"
     24        fi
     25      ],
     26      [AC_MSG_RESULT([compile optimization disabled])
     27        if test x"${CFLAGS}" == x; then
     28          CFLAGS="-Wall -Werror"
     29        else
     30          CFLAGS="${CFLAGS=} -Wall -Werror"
     31        fi
     32      ]
     33    )
    1434])
     35
     36dnl IPP_STDLDFLAGS must go *before* external probes (so linking is done with --no-as-needed if needed)
     37AC_DEFUN([IPP_STDLDFLAGS],
     38[
     39    dnl this section accepts a user-defined LDFLAGS, and sets LDFLAGS to the empty string if not present
     40    AC_ARG_ENABLE(no-as-needed,
     41      [AS_HELP_STRING(--enable-no-as-needed, prevent as-needed option sometimes supplied to gcc such as Ubuntu after 11.11)],
     42      [AC_MSG_RESULT(no-as-needed passed to linker)
     43        if test x"${LDFLAGS}" == x; then
     44          LDFLAGS="-Wl,--no-as-needed"
     45        else
     46          LDFLAGS="${LDFLAGS=} -Wl,--no-as-needed"
     47        fi
     48      ],
     49      [AC_MSG_RESULT(as-needed linker flags accepted)
     50        if test x"${LDFLAGS}" == x; then
     51          LDFLAGS=""
     52        fi
     53      ]
     54    )
     55])
     56dnl
    1557
    1658AC_DEFUN([IPP_STDOPTS],
  • trunk/psLib/src/astro/psTime.c

    r30724 r34089  
    223223static bool timeInit(const char *fileName)
    224224{
    225     psS32 numLines = 0;
    226225    bool foundTable = false;
    227226    char *tableDir = NULL;
     
    390389        if (i < numTables) {
    391390            table = psLookupTableAlloc(fullTableName, (const char*)tableFormat, tablesIndex->data.S32[i]);
    392             numLines = psLookupTableRead(table);
     391            psLookupTableRead(table);
    393392        } else {
    394393            psError(PS_ERR_BAD_PARAMETER_VALUE, no_problem,
  • trunk/psLib/src/fits/psFitsTable.c

    r31152 r34089  
    511511                colSpec *spec = psAlloc(sizeof(colSpec)); // Specification for this column
    512512                // BOOL type is not a valid vector type, so we translate it to U8
    513                 spec->type = colItem->type == PS_TYPE_BOOL ? PS_TYPE_U8 : colItem->type;
     513                spec->type = colItem->type == PS_DATA_BOOL ? PS_DATA_U8 : colItem->type;
    514514                spec->size = size;
    515515                if (colItem->type == PS_DATA_VECTOR) {
     
    526526                }
    527527                if (colItem->type != spec->type &&
    528                     colItem->type != PS_TYPE_BOOL && spec->type != PS_TYPE_U8) {
     528                    colItem->type != PS_DATA_BOOL && spec->type != PS_DATA_U8) {
    529529                    psWarning("Differing type found for column %s: %x vs %x --- using the first found.\n",
    530530                              colSpecItem->name, colItem->type, spec->type);
  • trunk/psLib/src/imageops/psImageGeomManip.c

    r31446 r34089  
    580580    psS32 outRows;
    581581    psS32 outCols;
    582     psS32 elementSize;
    583582    psElemType type;
    584583
     
    594593    outCols = input->numCols;
    595594    type = input->type.type;
    596     elementSize = PSELEMTYPE_SIZEOF(type);
     595    // XXX unused psS32 elementSize = PSELEMTYPE_SIZEOF(type);
    597596    out = psImageRecycle(out, outCols, outRows, type);
    598597
  • trunk/psLib/src/imageops/psImageInterpolate.c

    r31446 r34089  
    461461    }
    462462
     463#define INTERPOLATE_CHECK() \
     464    if (xMin < 0) { /* XXX warn or error? */ } \
     465    if (yMin < 0) { /* XXX warn or error? */ } \
     466    if (xMax >= image->numCols) { /* XXX warn or error? */ } \
     467    if (yMax >= image->numRows) { /* XXX warn or error? */ } \
     468
    463469// Determine the result of the interpolation after all the math has been done
    464470static psImageInterpolateStatus interpolateResult(const psImageInterpolation *interp,
     
    523529    }
    524530    INTERPOLATE_RANGE();
     531    INTERPOLATE_CHECK();
    525532
    526533    // Get the appropriate kernels
     
    779786    }
    780787    INTERPOLATE_RANGE();
     788    INTERPOLATE_CHECK();
    781789
    782790    // Get the appropriate kernels
     
    989997    INTERPOLATE_SETUP(x, y);
    990998    xExact = yExact = false;
     999    if (xExact && yExact) { /* possible alternative */ }
    9911000
    9921001    psF32 xKernel[size], yKernel[size]; // Interpolation kernels
     
    10381047    INTERPOLATE_SETUP(x, y);
    10391048    xExact = yExact = false;
     1049    if (xExact && yExact) { /* possible alternative */ }
    10401050
    10411051    psF32 xKernel[size], yKernel[size]; // Interpolation kernels
  • trunk/psLib/src/imageops/psImageStructManip.c

    r21347 r34089  
    212212    elementSize = PSELEMTYPE_SIZEOF(inDatatype);
    213213
     214    if (0) { fprintf (stderr, "%d elements, %d total memory\n", elements, elements * elementSize); }
     215
    214216    output = p_psImageRecycle(file, lineno, func, output, numCols, numRows, type);
    215217    P_PSIMAGE_SET_COL0(output, input->col0);
  • trunk/psLib/src/math/psMinimizePowell.c

    r28998 r34089  
    367367    psF32 c = 0.0;
    368368    psF32 n = 0.0;
    369     psF32 fa = 0.0;
    370     psF32 fb = 0.0;
    371     psF32 fc = 0.0;
    372369    psF32 fn = 0.0;
    373370    psF32 mul = 0.0;
     
    415412        PS_VECTOR_ADD_MULTIPLE(params, paramMask, line, tmpb, b);
    416413        PS_VECTOR_ADD_MULTIPLE(params, paramMask, line, tmpc, c);
    417         fa = func(tmpa, coords);
    418         fb = func(tmpb, coords);
    419         fc = func(tmpc, coords);
     414        psF32 fb = func(tmpb, coords);
     415# if (PS_TRACE_ON)
     416        psF32 fa = func(tmpa, coords);
     417        psF32 fc = func(tmpc, coords);
    420418        psTrace("psLib.math", 6, "LineMin: f(%f %f %f) is (%f %f %f)\n", a, b, c, fa, fb, fc);
     419# endif
    421420
    422421        // We determine which is the biggest segment in [a,b,c] then split
  • trunk/psLib/src/mathtypes/psVector.c

    r26892 r34089  
    322322            PSVECTOR_COPY_SAME_CASE(F32);
    323323            PSVECTOR_COPY_SAME_CASE(F64);
    324         default: {
    325                 char* typeStr;
    326                 PS_TYPE_NAME(typeStr,type);
    327                 psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    328                         //                        _("Input psVector is an unsupported type (0x%x)."), typeStr);
    329                         "Input psVector is an unsupported type.\n");
    330                 psFree(output);
    331                 return NULL;
    332             }
     324          default: {
     325              psError(PS_ERR_BAD_PARAMETER_TYPE, true, "Input psVector is an unsupported type.\n");
     326              psFree(output);
     327              return NULL;
     328          }
    333329        }
    334330        return output;
  • trunk/psLib/src/types/psLookupTable.c

    r27774 r34089  
    607607    psU64 loIdx = 0;
    608608    long  numRows = 0;
    609     long numCols = 0;
    610609    psF64 out = 0.0;
    611610    psF64 denom = 0.0;
     
    619618    values = table->values;
    620619    numRows = table->index->n;
    621     numCols = table->values->n;
    622620    valuesVec = (psVector*)values->data[column];
    623621
  • trunk/psLib/src/types/psMetadata.c

    r30024 r34089  
    15041504              fprintf(fd, "\n");
    15051505              break;
    1506             case PS_DATA_UNKNOWN:
    15071506            default:
    15081507              fprintf(fd, "<Unsupported type>\n");
  • trunk/psLib/src/types/psMetadataConfig.c

    r31902 r34089  
    15731573            }
    15741574            break;
    1575         case PS_DATA_UNKNOWN:
    15761575        default:
    15771576            psError(PS_ERR_BAD_PARAMETER_VALUE, true,
  • trunk/psLib/src/types/psMetadataItemCompare.c

    r20479 r34089  
    129129  case PS_TYPE_##COMPARETYPENAME: { \
    130130      TEMPLATETYPE valueC = (TEMPLATETYPE)compare->data.COMPARENAME; \
    131       TEMPLATETYPE valueT = (TEMPLATETYPE)template->data.TEMPLATENAME; \
    132       /* XXX check the validiy of the type casting? */ \
    133       if (valueC != compare->data.COMPARENAME) { \
    134           return false; \
    135       } \
    136       COMPARE_VALUES(valueT, valueC, (template->type == PS_TYPE_F32 || template->type == PS_TYPE_F64)); \
     131      TEMPLATETYPE valueT = (TEMPLATETYPE)template->data.TEMPLATENAME;  \
     132      /* XXX check the validiy of the type casting? */                  \
     133      if (valueC != compare->data.COMPARENAME) {                        \
     134        return false;                                                   \
     135      }                                                                 \
     136      COMPARE_VALUES(valueT, valueC, (template->type == PS_DATA_F32 || template->type == PS_DATA_F64)); \
     137      /* COMPARE_VALUES(valueT, valueC, 1);                             */  \
    137138      psAbort("Should never reach here."); \
    138139  }
     
    277278                    return false;
    278279                }
    279                 double compareValue = compare->type == PS_TYPE_F32 ? compare->data.F32 : compare->data.F64;
     280                double compareValue = compare->type == PS_DATA_F32 ? compare->data.F32 : compare->data.F64;
    280281                COMPARE_VALUES(templateValue, compareValue, true);
    281282            }
  • trunk/psLib/test/tap/src/tap.c

    r8958 r34089  
    8787    if(test_name != NULL) {
    8888        va_start(ap, test_name);
    89         vasprintf(&local_test_name, test_name, ap);
     89        int status = vasprintf(&local_test_name, test_name, ap);
     90        if (status) {/* warning? */}
    9091        va_end(ap);
    9192
     
    303304
    304305    va_start(ap, fmt);
    305     asprintf(&skip_msg, fmt, ap);
     306    int status = asprintf(&skip_msg, fmt, ap);
     307    if (status) {/* warning? */}
    306308    va_end(ap);
    307309
     
    328330
    329331    va_start(ap, fmt);
    330     vasprintf(&todo_msg, fmt, ap);
     332    int status = vasprintf(&todo_msg, fmt, ap);
     333    if (status) {/* warning? */}
    331334    va_end(ap);
    332335
  • trunk/psastro/configure.ac

    r23804 r34089  
    99AM_MAINTAINER_MODE
    1010
    11 IPP_STDCFLAGS
     11IPP_STDLDFLAGS
    1212
    1313AC_LANG(C)
     
    189189dnl Set CFLAGS for build
    190190IPP_STDOPTS
    191 CFLAGS="${CFLAGS=} -Wall -Werror"
     191IPP_STDCFLAGS
     192
    192193echo "PSASTRO_CFLAGS: $PSASTRO_CFLAGS"
    193194echo "PSASTRO_LIBS: $PSASTRO_LIBS"
  • trunk/pstamp/configure.ac

    r28486 r34089  
    1010AM_MAINTAINER_MODE
    1111
    12 IPP_STDCFLAGS
     12IPP_STDLDFLAGS
    1313
    1414AC_LANG(C)
     
    3030PKG_CHECK_MODULES([PSMODULE], [psmodules >= 1.0.0])
    3131
     32OHANA_CONFIG=`which ohana-config`
     33
     34dnl get CFLAGS for ohana
     35AC_MSG_NOTICE([libohana cflags info supplied by ohana-config])
     36AC_MSG_CHECKING([libohana cflags])
     37OHANA_CFLAGS="`${OHANA_CONFIG} --cflags`"
     38AC_MSG_RESULT([${OHANA_CFLAGS}])
     39
     40dnl get LDFLAGS for ohana
     41AC_MSG_NOTICE([libohana ldflags info supplied by ohana-config])
     42AC_MSG_CHECKING([libohana ldflags])
     43OHANA_LIBS="`${OHANA_CONFIG} --libs`"
     44AC_MSG_RESULT([${OHANA_LIBS}])
     45
    3246dnl Set CFLAGS for build
    3347IPP_STDOPTS
    34 CFLAGS="${CFLAGS} -Wall -Werror"
    35 PPSTAMP_CFLAGS="${PSLIB_CFLAGS=} ${PSMODULES_CFLAGS=}"
    36 PPSTAMP_LIBS="${PSLIB_LIBS=} ${PSMODULES_LIBS=}"
     48IPP_STDCFLAGS
     49
     50PPSTAMP_CFLAGS="${PSLIB_CFLAGS=} ${PSMODULE_CFLAGS=} ${OHANA_CFLAGS}"
     51PPSTAMP_LIBS="${PSLIB_LIBS=} ${PSMODULE_LIBS=} ${OHANA_LIBS}"
    3752echo "PPSTAMP_CFLAGS: $PPSTAMP_CFLAGS"
    3853echo "PPSTAMP_LIBS: $PPSTAMP_LIBS"
  • trunk/pstamp/scripts

  • trunk/pstamp/src/Makefile.am

    r25709 r34089  
    99        pstampErrorCodes.h
    1010
    11 ppstamp_CPPFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS)
    12 pstamprequest_CPPFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS)
    13 pstampdump_CPPFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS)
     11ppstamp_CPPFLAGS = $(PPSTAMP_CFLAGS)
     12pstamprequest_CPPFLAGS = $(PPSTAMP_CFLAGS)
     13pstampdump_CPPFLAGS = $(PPSTAMP_CFLAGS)
    1414
    15 ppstamp_LDFLAGS = $(PSLIB_LIBS) $(PSMODULE_LIBS)
    16 pstamprequest_LDFLAGS = $(PSLIB_LIBS) $(PSMODULE_LIBS)
    17 pstampdump_LDFLAGS = $(PSLIB_LIBS) $(PSMODULE_LIBS)
     15ppstamp_LDFLAGS = $(PPSTAMP_LIBS)
     16pstamprequest_LDFLAGS = $(PPSTAMP_LIBS)
     17pstampdump_LDFLAGS = $(PPSTAMP_LIBS)
    1818
    1919ppstamp_SOURCES = \
  • trunk/pstamp/src/pstamprequest.c

    r26289 r34089  
    191191    bool        gotRange  = false;
    192192    bool        needROI   = false;
    193     bool        makeStamps= false;
     193    // bool        makeStamps= false; XXX unused
    194194    unsigned    optionMask = PSTAMP_SELECT_IMAGE;
    195195
     
    212212        psMetadataAddStr (md, PS_LIST_TAIL, "JOB_TYPE", PS_META_REPLACE, "", "stamp");
    213213        needROI = true;
    214         makeStamps = true;
     214        // XXX unused makeStamps = true;
    215215    }
    216216
  • trunk/psvideophot

  • trunk/psvideophot/configure.ac

    r31290 r34089  
    88AM_MAINTAINER_MODE
    99
    10 IPP_STDCFLAGS
     10IPP_STDLDFLAGS
    1111
    1212AC_LANG(C)
     
    2424
    2525IPP_STDOPTS
    26 CFLAGS="${CFLAGS=} -Wall -Werror"
     26IPP_STDCFLAGS
    2727
    2828IPP_VERSION
  • trunk/pswarp/configure.ac

    r23806 r34089  
    99AM_MAINTAINER_MODE
    1010
    11 IPP_STDCFLAGS
     11IPP_STDLDFLAGS
    1212
    1313AC_LANG(C)
     
    3333dnl Set CFLAGS for build
    3434IPP_STDOPTS
    35 CFLAGS="${CFLAGS} -Wall -Werror"
     35IPP_STDCFLAGS
     36
    3637echo "PSWARP_CFLAGS: $PSWARP_CFLAGS"
    3738echo "PSWARP_LIBS: $PSWARP_LIBS"
  • trunk/pswarp/src/pswarpArguments.c

    r31159 r34089  
    2828pmConfig *pswarpArguments (int argc, char **argv) {
    2929
    30     bool status;
    3130    int N;
    3231
     
    101100    array = psArrayAlloc(1);
    102101    array->data[0] = psStringCopy(argv[2]);
    103     status = psMetadataAddPtr(config->arguments, PS_LIST_TAIL, "SKYCELL", PS_DATA_ARRAY, "", array);
     102    psMetadataAddPtr(config->arguments, PS_LIST_TAIL, "SKYCELL", PS_DATA_ARRAY, "", array);
    104103    psFree(array);
    105104
  • trunk/pswarp/src/pswarpExit.c

    r27563 r34089  
    2020    }
    2121
    22     psErrorCode errorCode = psErrorCodeLast(); // Error code
     22    // gcc -Wswitch complains here if err is declared as type psErrorCode
     23    // the collection of ps*ErrorCode values are enums defined separately for
     24    // each module (psphot, pswarp, etc).  the lowest type, psErrorCode is only the base set and does
     25    // not include the possible psphot values
     26
     27    // for now, to get around this, we just use an int for the switch
     28
     29    // psErrorCode errorCode = psErrorCodeLast(); // Error code
     30    int errorCode = psErrorCodeLast(); // Error code
     31
    2332    if (errorCode != PS_ERR_NONE) {
    2433        pmFPAfileFreeSetStrict(false);
  • trunk/pswarp/src/pswarpTransformReadout.c

    r33090 r34089  
    5151    }
    5252
    53     int nThreads = psMetadataLookupS32(&mdok, config->arguments, "NTHREADS"); // Number of threads
    54     if (!mdok) {
    55         nThreads = 0;
    56     }
     53    // XXX unused int nThreads = psMetadataLookupS32(&mdok, config->arguments, "NTHREADS"); // Number of threads
     54    // XXX unused if (!mdok) {
     55    // XXX unused     nThreads = 0;
     56    // XXX unused }
    5757    float poorFrac = psMetadataLookupF32(NULL, config->arguments, "POOR.FRAC"); ///< Flux fraction for "poor"
    5858
Note: See TracChangeset for help on using the changeset viewer.