Tcl Source Code

Check-in [f1087fce88]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:fix warnings in tclTest.c
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-4-branch
Files: files | file ages | folders
SHA1: f1087fce88f964549049198afb022e751361323b
User & Date: jan.nijtmans 2011-04-21 12:05:13
Context
2011-04-21
12:58
Make sure SetFooFromAny routines react reasonably when passed a NULL interp. check-in: 2adc132d52 user: dgp tags: core-8-4-branch
12:07
merge-mark check-in: d6aef45cc4 user: jan.nijtmans tags: core-8-5-branch
12:05
fix warnings in tclTest.c check-in: f1087fce88 user: jan.nijtmans tags: core-8-4-branch
08:08
fix for [Bug 3288345]: Wrong Tcl_StatBufused on MinGW. Make sure that all _WIN32 compilers use exact... check-in: 85f64af9fd user: jan.nijtmans tags: core-8-4-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tclTest.c.

323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
			    ClientData dummy, Tcl_Interp *interp, int argc,
			    CONST char **argv));
static int		TestsetplatformCmd _ANSI_ARGS_((ClientData dummy,
			    Tcl_Interp *interp, int argc, CONST char **argv));
static int		TeststaticpkgCmd _ANSI_ARGS_((ClientData dummy,
			    Tcl_Interp *interp, int argc, CONST char **argv));
static int		PretendTclpStat _ANSI_ARGS_((CONST char *path,
			    struct stat *buf));
static int		TestStatProc1 _ANSI_ARGS_((CONST char *path,
			    struct stat *buf));
static int		TestStatProc2 _ANSI_ARGS_((CONST char *path,
			    struct stat *buf));
static int		TestStatProc3 _ANSI_ARGS_((CONST char *path,
			    struct stat *buf));
static int		TeststatprocCmd _ANSI_ARGS_((ClientData dummy,
			    Tcl_Interp *interp, int argc, CONST char **argv));
static int		TesttranslatefilenameCmd _ANSI_ARGS_((ClientData dummy,
			    Tcl_Interp *interp, int argc, CONST char **argv));
static int		TestupvarCmd _ANSI_ARGS_((ClientData dummy,
			    Tcl_Interp *interp, int argc, CONST char **argv));
static int              TestWrongNumArgsObjCmd _ANSI_ARGS_((







|

|

|

|







323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
			    ClientData dummy, Tcl_Interp *interp, int argc,
			    CONST char **argv));
static int		TestsetplatformCmd _ANSI_ARGS_((ClientData dummy,
			    Tcl_Interp *interp, int argc, CONST char **argv));
static int		TeststaticpkgCmd _ANSI_ARGS_((ClientData dummy,
			    Tcl_Interp *interp, int argc, CONST char **argv));
static int		PretendTclpStat _ANSI_ARGS_((CONST char *path,
			    Tcl_StatBuf *buf));
static int		TestStatProc1 _ANSI_ARGS_((CONST char *path,
			    Tcl_StatBuf *buf));
static int		TestStatProc2 _ANSI_ARGS_((CONST char *path,
			    Tcl_StatBuf *buf));
static int		TestStatProc3 _ANSI_ARGS_((CONST char *path,
			    Tcl_StatBuf *buf));
static int		TeststatprocCmd _ANSI_ARGS_((ClientData dummy,
			    Tcl_Interp *interp, int argc, CONST char **argv));
static int		TesttranslatefilenameCmd _ANSI_ARGS_((ClientData dummy,
			    Tcl_Interp *interp, int argc, CONST char **argv));
static int		TestupvarCmd _ANSI_ARGS_((ClientData dummy,
			    Tcl_Interp *interp, int argc, CONST char **argv));
static int              TestWrongNumArgsObjCmd _ANSI_ARGS_((
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
    }

    return retVal;
}

static int PretendTclpStat(path, buf)
    CONST char *path;
    struct stat *buf;
{
    int ret;
    Tcl_Obj *pathPtr = Tcl_NewStringObj(path, -1);
#ifdef TCL_WIDE_INT_IS_LONG
    Tcl_IncrRefCount(pathPtr);
    ret = TclpObjStat(pathPtr, buf);
    Tcl_DecrRefCount(pathPtr);







|







4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
    }

    return retVal;
}

static int PretendTclpStat(path, buf)
    CONST char *path;
    Tcl_StatBuf *buf;
{
    int ret;
    Tcl_Obj *pathPtr = Tcl_NewStringObj(path, -1);
#ifdef TCL_WIDE_INT_IS_LONG
    Tcl_IncrRefCount(pathPtr);
    ret = TclpObjStat(pathPtr, buf);
    Tcl_DecrRefCount(pathPtr);
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
 * leading : in the beginning of non-absolute paths before passing them 
 * into the file command procedures.
 */

static int
TestStatProc1(path, buf)
    CONST char *path;
    struct stat *buf;
{
    memset(buf, 0, sizeof(struct stat));
    buf->st_size = 1234;
    return ((strstr(path, "testStat1%.fil") == NULL) ? -1 : 0);
}


static int
TestStatProc2(path, buf)
    CONST char *path;
    struct stat *buf;
{
    memset(buf, 0, sizeof(struct stat));
    buf->st_size = 2345;
    return ((strstr(path, "testStat2%.fil") == NULL) ? -1 : 0);
}


static int
TestStatProc3(path, buf)
    CONST char *path;
    struct stat *buf;
{
    memset(buf, 0, sizeof(struct stat));
    buf->st_size = 3456;
    return ((strstr(path, "testStat3%.fil") == NULL) ? -1 : 0);
}

/*
 *----------------------------------------------------------------------
 *







|

|








|

|








|

|







4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
 * leading : in the beginning of non-absolute paths before passing them 
 * into the file command procedures.
 */

static int
TestStatProc1(path, buf)
    CONST char *path;
    Tcl_StatBuf *buf;
{
    memset(buf, 0, sizeof(Tcl_StatBuf));
    buf->st_size = 1234;
    return ((strstr(path, "testStat1%.fil") == NULL) ? -1 : 0);
}


static int
TestStatProc2(path, buf)
    CONST char *path;
    Tcl_StatBuf *buf;
{
    memset(buf, 0, sizeof(Tcl_StatBuf));
    buf->st_size = 2345;
    return ((strstr(path, "testStat2%.fil") == NULL) ? -1 : 0);
}


static int
TestStatProc3(path, buf)
    CONST char *path;
    Tcl_StatBuf *buf;
{
    memset(buf, 0, sizeof(Tcl_StatBuf));
    buf->st_size = 3456;
    return ((strstr(path, "testStat3%.fil") == NULL) ? -1 : 0);
}

/*
 *----------------------------------------------------------------------
 *