[PATCH XTS] tet: tet_getvar needs to take a const char* argument
Aaron Plattner
aplattner at nvidia.com
Tue May 24 13:18:12 PDT 2011
config.c: In function ‘initconfig’:
config.c:394: error: passing argument 1 of ‘_initconfig’ from incompatible pointer type
config.c:328: note: expected ‘char * (*)(const char *)’ but argument is of type ‘char * (*)(char *)’
Signed-off-by: Aaron Plattner <aplattner at nvidia.com>
---
I'm thinking of making a release after this patch, with the current version
number 0.99.0 even though there are a ton of warning fixes we can still
make and a lot of the tests are expected to fail. The reason is that some
people are actually getting serious about running XTS and I want to give
them a tagged release version they can use as a baseline.
Let me know if you have objections, concerns, or changes that you think
should go in first.
include/tet_api.h | 5 ++++-
src/tet3/apilib/dconfig.c | 5 ++---
src/tet3/llib/llib-lapi.c | 5 ++---
src/tet3/tcm/dtcm.c | 4 +---
4 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/include/tet_api.h b/include/tet_api.h
index 1f70e28..36561ea 100644
--- a/include/tet_api.h
+++ b/include/tet_api.h
@@ -104,6 +104,9 @@ MODIFICATIONS:
Andrew Dingwall, UniSoft Ltd., August 1998
Added support for shared libraries.
+ Aaron Plattner, NVIDIA Corporation, April 2011
+ tet_getvar needs to take a const char* argument.
+
************************************************************************/
#ifndef TET_API_H_INCLUDED
@@ -311,7 +314,7 @@ extern "C" {
/* functions in TETware-Lite and in Distrubuted TETware */
TET_IMPORT_FUNC(void, tet_delete, TET_PROTOLIST((int, char *)));
TET_NORETURN TET_IMPORT_FUNC(void, tet_exit, TET_PROTOLIST((int)));
-TET_IMPORT_FUNC(char *, tet_getvar, TET_PROTOLIST((char *)));
+TET_IMPORT_FUNC(char *, tet_getvar, TET_PROTOLIST((const char *)));
TET_IMPORT_FUNC(void, tet_infoline, TET_PROTOLIST((char *)));
TET_IMPORT_FUNC(int, tet_kill, TET_PROTOLIST((pid_t, int)));
TET_IMPORT_FUNC(void, tet_logoff, TET_PROTOLIST((void)));
diff --git a/src/tet3/apilib/dconfig.c b/src/tet3/apilib/dconfig.c
index 6306dc2..1295579 100644
--- a/src/tet3/apilib/dconfig.c
+++ b/src/tet3/apilib/dconfig.c
@@ -54,7 +54,7 @@ AUTHOR: Geoff Clare, UniSoft Ltd.
DATE CREATED: 27 July 1990
SYNOPSIS:
- char *tet_getvar(char *name);
+ char *tet_getvar(const char *name);
void tet_config(void);
@@ -106,8 +106,7 @@ MODIFICATIONS:
static char **varptrs;
static int lvarptrs, nvarptrs;
-TET_IMPORT char *tet_getvar(name)
-char *name;
+TET_IMPORT char *tet_getvar(const char *name)
{
/* return value of specified configuration variable */
diff --git a/src/tet3/llib/llib-lapi.c b/src/tet3/llib/llib-lapi.c
index 949f156..4904bb0 100644
--- a/src/tet3/llib/llib-lapi.c
+++ b/src/tet3/llib/llib-lapi.c
@@ -101,10 +101,9 @@ struct tet_sysent *sysp;
return 0;
}
-char *tet_getvar(name)
-char *name;
+char *tet_getvar(const char *name)
{
- return((char *) 0);
+ return((const char *) 0);
}
void tet_infoline(data)
diff --git a/src/tet3/tcm/dtcm.c b/src/tet3/tcm/dtcm.c
index 331886d..ecfc0a3 100644
--- a/src/tet3/tcm/dtcm.c
+++ b/src/tet3/tcm/dtcm.c
@@ -659,9 +659,7 @@ int sig;
static void
-sig_init(var, set)
-char *var;
-sigset_t *set;
+sig_init(const char *var, sigset_t *set)
{
/* initialise signal set from list in specified variable */
--
1.7.1
More information about the xorg-devel
mailing list