IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 584


Ignore:
Timestamp:
May 5, 2004, 2:20:50 PM (22 years ago)
Author:
harman
Message:

Update makefile and *.c files with warnings that caused build to fail

Location:
trunk/psLib/test/sysUtils
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/sysUtils/Makefile

    r560 r584  
    33##  Makefile:   test/sysUtils
    44##
    5 ##  $Revision: 1.6 $  $Name: not supported by cvs2svn $
    6 ##  $Date: 2004-05-01 23:04:35 $
     5##  $Revision: 1.7 $  $Name: not supported by cvs2svn $
     6##  $Date: 2004-05-06 00:20:50 $
    77##
    88##  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    1010###############################################################################
    1111
    12 ###############################################################################
    13 #    Note: I added specific entries for the psTrace files.  The reason I did
    14 #    this was because the generic rules were failing on the existing test
    15 #    code (and hence, on my tst_psTraceXX.c code as well).  I am tempted to
    16 #    fix the generic rules, but that might break existing codes.  When this
    17 #    problem is resolved, I'll remove the specific rules for psTrace.  -GLG
    18 #    Also, psLogMsg.
    19 #    Also, psHash.
    20 ###############################################################################
    2112include ../../src/Makefile.Globals
    2213
    2314PSLIB_INCL_DIR = ../../include
     15
    2416PSLIB_LIB_DIR = ../../lib
    2517
    26 TARGET = tst_psError        \
    27          tstMemory          \
    28          atst_psAbort_01    \
    29          atst_psAbort_02    \
    30          atst_psAbort_03    \
    31          tst_psStringCopy
    32 TARGET_TRACE = tst_psTrace00 tst_psTrace01 tst_psTrace02 tst_psTrace03 \
    33                tst_psTrace04
    34 TARGET_LOGMSG = tst_psLogMsg00 tst_psLogMsg01 tst_psLogMsg02 tst_psLogMsg03
    35 TARGET_HASH = tst_psHash00 tst_psHash01 tst_psHash02 tst_psHash03 tst_psHash04
     18TARGET = atst_psAbort_01  \
     19         atst_psAbort_02  \
     20         atst_psAbort_03  \
     21         tstMemory        \
     22         tst_psError      \
     23         tst_psHash00     \
     24         tst_psHash01     \
     25         tst_psHash02     \
     26         tst_psHash03     \
     27         tst_psHash04     \
     28         tst_psLogMsg00   \
     29         tst_psLogMsg01   \
     30         tst_psLogMsg02   \
     31         tst_psLogMsg03   \
     32         tst_psStringCopy \
     33         tst_psTrace00    \
     34         tst_psTrace01    \
     35         tst_psTrace02    \
     36         tst_psTrace03    \
     37         tst_psTrace04
    3638
    37 all:            $(TARGET)
    38 psTrace:        $(TARGET_TRACE)
    39 psLogMsg:       $(TARGET_LOGMSG)
    40 psHash: $(TARGET_HASH)
     39all: $(TARGET)
    4140
    42 tst_psError: tst_psError.o
    4341atst_psAbort_01: atst_psAbort_01.o
    4442atst_psAbort_02: atst_psAbort_02.o
    4543atst_psAbort_03: atst_psAbort_03.o
     44tstMemory: tstMemory.o
     45tst_psError: tst_psError.o   
     46tst_psHash00: tst_psHash00.o 
     47tst_psHash01: tst_psHash01.o 
     48tst_psHash02: tst_psHash02.o
     49tst_psHash03: tst_psHash03.o
     50tst_psHash04: tst_psHash04.o 
     51tst_psLogMsg00: tst_psLogMsg00.o
     52tst_psLogMsg01: tst_psLogMsg01.o
     53tst_psLogMsg02: tst_psLogMsg02.o
     54tst_psLogMsg03: tst_psLogMsg03.o
    4655tst_psStringCopy: tst_psStringCopy.o
     56tst_psTrace00: tst_psTrace00.o
     57tst_psTrace01: tst_psTrace01.o
     58tst_psTrace02: tst_psTrace02.o
     59tst_psTrace03: tst_psTrace03.o
     60tst_psTrace04: tst_psTrace04.o
    4761
    4862clean:
     
    5064        $(RM) $(TARGET) *.o *.lint
    5165
    52 tst_psHash00:   tst_psHash00.c
    53         $(CC) tst_psHash00.c $(LDFLAGS) -L$(PSLIB_LIB_DIR) -L.. -lpslib -lpstest -I$(PSLIB_INCL_DIR) -I.. -o tst_psHash00
    54 
    55 tst_psHash01:   tst_psHash01.c
    56         $(CC) tst_psHash01.c $(LDFLAGS) -L$(PSLIB_LIB_DIR) -L.. -lpslib -lpstest -I$(PSLIB_INCL_DIR) -I.. -o tst_psHash01
    57 
    58 tst_psHash02:   tst_psHash02.c
    59         $(CC) tst_psHash02.c $(LDFLAGS) -L$(PSLIB_LIB_DIR) -L.. -lpslib -lpstest -I$(PSLIB_INCL_DIR) -I.. -o tst_psHash02
    60 
    61 tst_psHash03:   tst_psHash03.c
    62         $(CC) tst_psHash03.c $(LDFLAGS) -L$(PSLIB_LIB_DIR) -L.. -lpslib -lpstest -I$(PSLIB_INCL_DIR) -I.. -o tst_psHash03
    63 
    64 tst_psHash04:   tst_psHash04.c
    65         $(CC) tst_psHash04.c $(LDFLAGS) -L$(PSLIB_LIB_DIR) -L.. -lpslib -lpstest -I$(PSLIB_INCL_DIR) -I.. -o tst_psHash04
    66 
    67 tst_psLogMsg00: tst_psLogMsg00.c
    68         $(CC) tst_psLogMsg00.c $(LDFLAGS) -L$(PSLIB_LIB_DIR) -L.. -lpslib -lpstest -I$(PSLIB_INCL_DIR) -I.. -o tst_psLogMsg00
    69 
    70 tst_psLogMsg01: tst_psLogMsg01.c
    71         $(CC) tst_psLogMsg01.c $(LDFLAGS) -L$(PSLIB_LIB_DIR) -L.. -lpslib -lpstest -I$(PSLIB_INCL_DIR) -I.. -o tst_psLogMsg01
    72 
    73 tst_psLogMsg02: tst_psLogMsg02.c
    74         $(CC) tst_psLogMsg02.c $(LDFLAGS) -L$(PSLIB_LIB_DIR) -L.. -lpslib -lpstest -I$(PSLIB_INCL_DIR) -I.. -o tst_psLogMsg02
    75 
    76 tst_psLogMsg03: tst_psLogMsg03.c
    77         $(CC) tst_psLogMsg03.c $(LDFLAGS) -L$(PSLIB_LIB_DIR) -L.. -lpslib -lpstest -I$(PSLIB_INCL_DIR) -I.. -o tst_psLogMsg03
    78 
    79 tst_psTrace00:  tst_psTrace00.c
    80         $(CC) tst_psTrace00.c $(LDFLAGS) -L$(PSLIB_LIB_DIR) -L.. -lpslib -lpstest -I$(PSLIB_INCL_DIR) -I.. -o tst_psTrace00
    81 
    82 tst_psTrace01:  tst_psTrace01.c
    83         $(CC) tst_psTrace01.c $(LDFLAGS) -L$(PSLIB_LIB_DIR) -L.. -lpslib -lpstest -I$(PSLIB_INCL_DIR) -I.. -o tst_psTrace01
    84 
    85 tst_psTrace02:  tst_psTrace02.c
    86         $(CC) tst_psTrace02.c $(LDFLAGS) -L$(PSLIB_LIB_DIR) -L.. -lpslib -lpstest -I$(PSLIB_INCL_DIR) -I.. -o tst_psTrace02
    87 
    88 tst_psTrace03:  tst_psTrace03.c
    89         $(CC) tst_psTrace03.c $(LDFLAGS) -L$(PSLIB_LIB_DIR) -L.. -lpslib -lpstest -I$(PSLIB_INCL_DIR) -I.. -o tst_psTrace03
    90 
    91 tst_psTrace04:  tst_psTrace04.c
    92         $(CC) tst_psTrace04.c $(LDFLAGS) -L$(PSLIB_LIB_DIR) -L.. -lpslib -lpstest -I$(PSLIB_INCL_DIR) -I.. -o tst_psTrace04
    93 
    9466%.o : %.c
    95         $(CC) $(CFLAGS) $(CPPFLAGS) -I.. -I$(PSLIB_INCL_DIR) -c -o $@ $<
     67        $(CC) $(CFLAGS) $(CPPFLAGS) -I$(PSLIB_INCL_DIR) -c -o $@ $<
    9668
    9769%   : %.o
    98         $(CC) $(LDFLAGS) -L$(PSLIB_LIB_DIR) -L.. -lpslib -lpstest -o $@ $<
     70        $(CC) $(LDFLAGS) -L$(PSLIB_LIB_DIR) -lpslib -lpstest -o $@ $<
    9971
    10072%.lint: %.c
    10173        splint +posixlib -exportlocal -realcompare $(INCLUDE_GLOBAL) $? > $@; cat $@
    10274
    103 distclean:
    104         rm -rf $(TARGET_TRACE) $(TARGET_LOGMSG) $(TARGET_HASH)
     75
  • trunk/psLib/test/sysUtils/tst_psHash00.c

    r560 r584  
    77#include "psHash.h"
    88#define NUM_HASH_TABLE_BUCKETS 10
    9 main()
     9int main()
    1010{
    1111    psHash *myHashTable = NULL;
     
    2626    if (myHashTable->nbucket != NUM_HASH_TABLE_BUCKETS) {
    2727        fprintf(stderr, "%s: myHashTable->nbucket not set properly.\n",
    28                 __func__, i);
     28                __func__);
    2929        testStatus = false;
    3030
     
    3333    if (myHashTable->buckets == NULL) {
    3434        fprintf(stderr, "%s: myHashTable->buckets is NULL.\n",
    35                 __func__, i);
     35                __func__);
    3636        testStatus = false;
    3737
     
    5151                testStatus);
    5252
    53     exit(!testStatus);
     53    return (!testStatus);
    5454}
  • trunk/psLib/test/sysUtils/tst_psHash01.c

    r560 r584  
    3232}
    3333
    34 main()
     34int main()
    3535{
    3636    psHash *myHashTable = NULL;
    3737    int testStatus      = true;
    38     int i               = 0;
    3938
    4039    printPositiveTestHeader(stdout,
     
    6867                testStatus);
    6968
    70     exit(!testStatus);
     69    return (!testStatus);
    7170}
  • trunk/psLib/test/sysUtils/tst_psHash02.c

    r560 r584  
    66 *****************************************************************************/
    77#include <stdio.h>
     8#include <string.h>
    89#include "pslib.h"
    910#include "psTest.h"
     
    3233}
    3334
    34 main()
     35int main()
    3536{
    3637    psHash *myHashTable = NULL;
     
    6869                testStatus);
    6970
    70     exit(!testStatus);
     71    return (!testStatus);
    7172}
  • trunk/psLib/test/sysUtils/tst_psHash03.c

    r560 r584  
    55 *****************************************************************************/
    66#include <stdio.h>
     7#include <string.h>
    78#include "pslib.h"
    89#include "psTest.h"
     
    3132}
    3233
    33 main()
     34int main()
    3435{
    3536    psHash *myHashTable = NULL;
     
    8182                testStatus);
    8283
    83     exit(!testStatus);
     84    return (!testStatus);
    8485}
  • trunk/psLib/test/sysUtils/tst_psHash04.c

    r561 r584  
    2929}
    3030
    31 main()
     31int main()
    3232{
    3333    psHash *myHashTable = NULL;
    3434    int testStatus      = true;
    3535    int i               = 0;
    36     ID *id              = NULL;
    3736    char *myKeys[] = {"ENTRY00", "ENTRY01", "ENTRY02", "ENTRY03", NULL};
    3837    char *myData[] = {"IDA", "IDB", "IDC", "IDD", NULL};
     
    6059                testStatus);
    6160
    62     exit(!testStatus);
     61    return(!testStatus);
    6362}
  • trunk/psLib/test/sysUtils/tst_psLogMsg00.c

    r560 r584  
    66#include "psTest.h"
    77
    8 main()
     8int main()
    99{
    1010    int i = 0;
    11     int lev = 0;
    1211    int testStatus = true;
    1312
     
    2625                "default log levels",
    2726                testStatus);
    28     exit(!testStatus);
     27    return(!testStatus);
    2928}
  • trunk/psLib/test/sysUtils/tst_psLogMsg01.c

    r560 r584  
    99#include "psTest.h"
    1010
    11 main()
     11int main()
    1212{
    1313    int i = 0;
    14     int lev = 0;
    1514    int testStatus = true;
    1615
     
    3433                "psSetLogLevel()",
    3534                testStatus);
    36     exit(!testStatus);
     35    return(!testStatus);
    3736}
  • trunk/psLib/test/sysUtils/tst_psLogMsg02.c

    r560 r584  
    99#include "psTest.h"
    1010
    11 main()
     11int main()
    1212{
    1313    int i = 0;
    14     int lev = 0;
    1514    int testStatus = true;
    1615
     
    6665                "psSetLogFormat()",
    6766                testStatus);
    68     exit(!testStatus);
     67    return(!testStatus);
    6968}
  • trunk/psLib/test/sysUtils/tst_psLogMsg03.c

    r560 r584  
    1010#include "psTest.h"
    1111
    12 main()
     12int main()
    1313{
    1414    int i = 0;
    15     int lev = 0;
    1615    int testStatus = true;
    1716
     
    4241                "psSetLogDestination()",
    4342                testStatus);
    44     exit(!testStatus);
     43    return(!testStatus);
    4544}
  • trunk/psLib/test/sysUtils/tst_psTrace00.c

    r560 r584  
    66#include "psTest.h"
    77
    8 main()
     8int main()
    99{
    1010    int i = 0;
     
    5959                "Testing psSetTraceLevel and psGetTraceLevel",
    6060                testStatus);
    61     exit(!testStatus);
     61    return(!testStatus);
    6262}
  • trunk/psLib/test/sysUtils/tst_psTrace01.c

    r560 r584  
    66#include "psTest.h"
    77
    8 main()
     8int main()
    99{
    1010    int i = 0;
     
    4545                successFlag);
    4646
    47     exit(!successFlag);
     47    return(!successFlag);
    4848}
  • trunk/psLib/test/sysUtils/tst_psTrace02.c

    r560 r584  
    77#include "psTest.h"
    88
    9 main()
     9int main()
    1010{
    11     int i = 0;
    12     int lev = 0;
    13     int errorFlag = 0;
    14 
    1511    printPositiveTestHeader(stdout,
    1612                            "psTrace functions",
     
    4440                true);
    4541
    46     exit(0);
     42    return(0);
    4743}
  • trunk/psLib/test/sysUtils/tst_psTrace03.c

    r560 r584  
    77#include "psTest.h"
    88
    9 main()
     9int main()
    1010{
    1111    printPositiveTestHeader(stdout,
     
    3636                true);
    3737
    38     exit(0);
     38    return(0);
    3939}
  • trunk/psLib/test/sysUtils/tst_psTrace04.c

    r560 r584  
    77#include "psTest.h"
    88
    9 main()
     9int main()
    1010{
    1111    printPositiveTestHeader(stdout,
     
    4545                    "psTraceReset() did not reset all levels of the tree.",
    4646                    false);
    47         exit(1);
     47        return(1);
    4848    } else {
    4949        printFooter(stdout,
     
    5151                    "psTraceReset()",
    5252                    true);
    53         exit(0);
     53        return(0);
    5454    }
    5555}
Note: See TracChangeset for help on using the changeset viewer.