IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 12512


Ignore:
Timestamp:
Mar 19, 2007, 5:31:39 PM (19 years ago)
Author:
jhoblitt
Message:

silence warnings

Location:
trunk/psLib/test
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/sys/tap_psString.c

    r12208 r12512  
    2020 *  @author  Eric Van Alst, MHPCC
    2121 *
    22  *  @version $Revision: 1.4 $  $Name: not supported by cvs2svn $
    23  *  @date  $Date: 2007-03-03 02:43:37 $
     22 *  @version $Revision: 1.5 $  $Name: not supported by cvs2svn $
     23 *  @date  $Date: 2007-03-20 03:31:39 $
    2424 *
    2525 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    5656psS32 testNULLStrings(void);
    5757psS32 testStrCheck(void);
    58 
    59 static const char* const NullString = "";
    6058
    6159
     
    311309    diag("testStrAppend03");
    312310
    313     char *str=NULL;
    314     int result;
    315 
    316     str = psStringCopy(STR_0);
     311    char *str =psStringCopy(STR_0);
    317312
    318313    // test null-op
    319     psStringAppend(&str, NullString);
    320     result = strcmp(str, STR_0);
    321     ok ( result == 0, "Failed test point str=[%s]\n", str);
     314    psStringAppend(&str, "%s", "");
     315    ok_str(str, STR_0, "Failed test point");
    322316    psFree(str);
    323317
     
    391385
    392386    // test null-op
    393     psStringPrepend(&str, NullString);
     387    psStringPrepend(&str, "%s", "");
    394388    result = strcmp(str, STR_0);
    395389    ok ( result == 0, "test point str=[%s]\n", str);
     
    531525psS32 testNULLStrings(void)
    532526{
    533     diag("testNULLStrings");
     527    diag("test""s");
    534528
    535529    psString nullTest = NULL;
     
    550544
    551545    //psStringAppend should return 0 for NULL input destination
    552     outSize = psStringAppend(nullDest, NullString);
     546    outSize = psStringAppend(nullDest, "%s", "");
    553547    ok (outSize == 0,
    554548        "psStringAppend to return 0 for NULL input destination.\n");
  • trunk/psLib/test/sys/tap_psTrace.c

    r10810 r12512  
    4949
    5050    //    psTraceSetDestination(stderr);
    51     psTraceSetDestination(2);
     51    (void)psTraceSetDestination(2);
    5252
    5353    for (i=0;i<10;i++) {
     
    8989
    9090    //    psTraceSetDestination(stderr);
    91     psTraceSetDestination(2);
     91    (void)psTraceSetDestination(2);
    9292    (void)psTraceSetLevel(".A.B.C.D.E", 5);
    9393
     
    107107    psTraceReset();
    108108    //    psTraceSetDestination(stderr);
    109     psTraceSetDestination(2);
    110     psTraceSetLevel(".A.B", 2);
    111     psTraceSetLevel(".A.B.C.D.E", 5);
    112     psTracePrintLevels();
    113     psTraceSetLevel(".A.B", 10);
     109    (void)psTraceSetDestination(2);
     110    (void)psTraceSetLevel(".A.B", 2);
     111    (void)psTraceSetLevel(".A.B.C.D.E", 5);
     112    psTracePrintLevels();
     113    (void)psTraceSetLevel(".A.B", 10);
    114114    psTracePrintLevels();
    115115
     
    137137
    138138    //    psTraceSetDestination(stderr);
    139     psTraceSetDestination(2);
     139    (void)psTraceSetDestination(2);
    140140
    141141    for (i=0;i<10;i++) {
     
    182182        if (nb == 0)
    183183            //            psTraceSetDestination(stdout);
    184             psTraceSetDestination(1);
     184            (void)psTraceSetDestination(1);
    185185        if (nb == 1)
    186186            //            psTraceSetDestination(stderr);
    187             psTraceSetDestination(2);
     187            (void)psTraceSetDestination(2);
    188188        if (nb == 2)
    189             psTraceSetDestination(0); //NULL
     189            (void)psTraceSetDestination(0); //NULL
    190190        if (nb == 3)
    191             psTraceSetDestination(FD);
     191            (void)psTraceSetDestination(FD);
    192192
    193193        (void)psTraceSetLevel(".", 4);
     
    226226{
    227227    //    psTraceSetDestination(stderr);
    228     psTraceSetDestination(2);
     228    (void)psTraceSetDestination(2);
    229229
    230230    (void)psTraceSetLevel(".", 9);
     
    277277{
    278278    //    psTraceSetDestination(stderr);
    279     psTraceSetDestination(2);
     279    (void)psTraceSetDestination(2);
    280280
    281281    (void)psTraceSetLevel(".", 9);
  • trunk/psLib/test/types/tap_psPixels_all.c

    r12331 r12512  
    273273    }
    274274
    275     psPixels *outPixels = NULL;
    276     {
     275    {
     276        psPixels *outPixels = NULL;
    277277        outPixels = psPixelsFromMask(outPixels, outImage, maskVal);
    278278        ok ( outPixels != NULL,
     
    281281    }
    282282
    283     //Return NULL for NULL image input
    284     {
    285         psPixels *outPixels = psPixelsFromMask(outPixels, NULL, maskVal);
     283    // Return NULL for NULL image input
     284    {
     285        psPixels *outPixels = NULL;
     286        outPixels = psPixelsFromMask(outPixels, NULL, maskVal);
    286287        ok ( outPixels == NULL,
    287288             "psPixelsFromMask:     return NULL for NULL image input.");
    288289    }
    289     //Return NULL for image with wrong maskType
     290
     291    // Return NULL for image with wrong maskType
    290292    *(psElemType*)&(outImage->type.type) = PS_TYPE_U32;
    291293    {
    292         psPixels *outPixels = psPixelsFromMask(outPixels, outImage, maskVal);
     294        psPixels *outPixels = NULL;
     295        outPixels = psPixelsFromMask(outPixels, outImage, maskVal);
    293296        ok ( outPixels == NULL,
    294297             "psPixelsFromMask:     return NULL for image with wrong maskType.");
    295298    }
    296299
    297     //psPixelsConcatenate Tests
    298     //Return NULL for NULL pixels input
    299     {
    300         psPixels *outPixels = psPixelsConcatenate(outPixels, NULL);
     300    // psPixelsConcatenate Tests
     301    // Return NULL for NULL pixels input
     302    {
     303        psPixels *outPixels = NULL;
     304        outPixels = psPixelsConcatenate(outPixels, NULL);
    301305        ok ( outPixels == NULL,
    302306             "psPixelsConcatenate:  return NULL for NULL pixels input.");
     
    306310    //Return copy of input pixels for NULL out pixels
    307311    {
     312        psPixels *outPixels = NULL;
    308313        outPixels = psPixelsFromMask(outPixels, outImage, maskVal);
    309314        outPixels = psPixelsConcatenate(outPixels, p0);
     
    313318        psFree(outPixels);
    314319    }
     320
    315321    //Return properly concatenated psPixels list
    316322    //Set all the compare cases to cover 'comparePixelCoord' as well.
    317     outPixels = psPixelsAlloc(5);
     323    psPixels *outPixels = psPixelsAlloc(5);
    318324    in.x = 1.0;
    319325    in.y = 1.0;
Note: See TracChangeset for help on using the changeset viewer.