mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Fix most of the following classes of warnings in the ToolTalk libraries:
- Const strings referenced by non-const variables. - Incorrect format specifers for printing addresses - Unused variables - Signed comparison to unsigned Also fix an incorrect enumeration value in a switch statement.
This commit is contained in:
parent
d6b6353f95
commit
e738704385
29 changed files with 51 additions and 57 deletions
|
@ -416,7 +416,7 @@ extern "C" {
|
||||||
}
|
}
|
||||||
|
|
||||||
Tt_status
|
Tt_status
|
||||||
_ttds_file_server(const char *filename, char **hostname)
|
_ttds_file_server(const char *filename, const char **hostname)
|
||||||
{
|
{
|
||||||
_Tt_c_file_ptr file;
|
_Tt_c_file_ptr file;
|
||||||
_Tt_db_results dbresults;
|
_Tt_db_results dbresults;
|
||||||
|
|
|
@ -173,13 +173,13 @@ void _Tt_api_stg_stack_elm::
|
||||||
print(FILE *f) const
|
print(FILE *f) const
|
||||||
{
|
{
|
||||||
|
|
||||||
(void)fprintf(f,"_Tt_api_stg_stack_elm at %lx <",this);
|
(void)fprintf(f,"_Tt_api_stg_stack_elm at %p <",this);
|
||||||
switch (entry_type) {
|
switch (entry_type) {
|
||||||
case STACK_MARK:
|
case STACK_MARK:
|
||||||
(void)fprintf(f,"mark %ld>\n",addr);
|
(void)fprintf(f,"mark %p>\n",addr);
|
||||||
break;
|
break;
|
||||||
case STACK_STORAGE:
|
case STACK_STORAGE:
|
||||||
(void)fprintf(f,"addr 0x%lx>\n",(long)addr);
|
(void)fprintf(f,"addr 0x%p>\n",addr);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,6 @@ ttdnd_init(
|
||||||
{
|
{
|
||||||
int mark = tt_mark();
|
int mark = tt_mark();
|
||||||
const char *t, **vt;
|
const char *t, **vt;
|
||||||
int validtypecount, i;
|
|
||||||
|
|
||||||
|
|
||||||
if (tt_ptr_error(tt_open())>TT_WRN_LAST) {
|
if (tt_ptr_error(tt_open())>TT_WRN_LAST) {
|
||||||
|
@ -238,7 +237,6 @@ _ttdnd_get_contents_callback(m, p)
|
||||||
Tt_message m;
|
Tt_message m;
|
||||||
Tt_pattern p;
|
Tt_pattern p;
|
||||||
{
|
{
|
||||||
int xid;
|
|
||||||
int chunknumber;
|
int chunknumber;
|
||||||
int maxchunk;
|
int maxchunk;
|
||||||
char *type;
|
char *type;
|
||||||
|
|
|
@ -276,7 +276,7 @@ bool_t xdr_Tt_oidaccess_results(XDR*, _Tt_oidaccess_results*);
|
||||||
struct _Tt_prop {
|
struct _Tt_prop {
|
||||||
struct {
|
struct {
|
||||||
u_int propname_len;
|
u_int propname_len;
|
||||||
char *propname_val;
|
const char *propname_val;
|
||||||
} propname;
|
} propname;
|
||||||
long recnum;
|
long recnum;
|
||||||
struct {
|
struct {
|
||||||
|
@ -862,7 +862,7 @@ bool_t xdr_tt_garbage_collect_results(XDR *, _tt_garbage_collect_results *);
|
||||||
|
|
||||||
#include "db/tt_db_client_utils.h"
|
#include "db/tt_db_client_utils.h"
|
||||||
|
|
||||||
extern int *_tt_min_auth_level_1(char**, CLIENT*, clnt_stat *status);
|
extern int *_tt_min_auth_level_1(const char**, CLIENT*, clnt_stat *status);
|
||||||
extern _Tt_isam_results *_tt_isaddindex_1(_Tt_isaddindex_args*, CLIENT*);
|
extern _Tt_isam_results *_tt_isaddindex_1(_Tt_isaddindex_args*, CLIENT*);
|
||||||
extern _Tt_isam_results *_tt_isbuild_1(_Tt_isbuild_args*, CLIENT*);
|
extern _Tt_isam_results *_tt_isbuild_1(_Tt_isbuild_args*, CLIENT*);
|
||||||
extern _Tt_isam_results *_tt_isclose_1(int*, CLIENT*);
|
extern _Tt_isam_results *_tt_isclose_1(int*, CLIENT*);
|
||||||
|
|
|
@ -1138,7 +1138,7 @@ _tt_get_all_sessions_1(_tt_get_all_sessions_args *argp, CLIENT * clnt)
|
||||||
{
|
{
|
||||||
static _tt_get_all_sessions_results res;
|
static _tt_get_all_sessions_results res;
|
||||||
|
|
||||||
clnt_stat result = clnt_call(clnt, TT_GET_ALL_SESSIONS,
|
clnt_call(clnt, TT_GET_ALL_SESSIONS,
|
||||||
(xdrproc_t) xdr_tt_get_all_sessions_args,
|
(xdrproc_t) xdr_tt_get_all_sessions_args,
|
||||||
(caddr_t) argp,
|
(caddr_t) argp,
|
||||||
(xdrproc_t) xdr_tt_get_all_sessions_results,
|
(xdrproc_t) xdr_tt_get_all_sessions_results,
|
||||||
|
@ -1153,7 +1153,7 @@ _tt_garbage_collect_1(void * /*NOTUSED*/, CLIENT *clnt)
|
||||||
{
|
{
|
||||||
static _tt_garbage_collect_results res;
|
static _tt_garbage_collect_results res;
|
||||||
|
|
||||||
clnt_stat result = clnt_call(clnt, TT_GARBAGE_COLLECT,
|
clnt_call(clnt, TT_GARBAGE_COLLECT,
|
||||||
(xdrproc_t) xdr_void, (caddr_t) NULL,
|
(xdrproc_t) xdr_void, (caddr_t) NULL,
|
||||||
(xdrproc_t) xdr_tt_garbage_collect_results,
|
(xdrproc_t) xdr_tt_garbage_collect_results,
|
||||||
(caddr_t) &res,
|
(caddr_t) &res,
|
||||||
|
@ -1167,7 +1167,7 @@ _tt_delete_session_1(_tt_delete_session_args * args, CLIENT *clnt)
|
||||||
{
|
{
|
||||||
static _tt_delete_session_results res;
|
static _tt_delete_session_results res;
|
||||||
|
|
||||||
clnt_stat result = clnt_call(clnt, TT_DELETE_SESSION,
|
clnt_call(clnt, TT_DELETE_SESSION,
|
||||||
(xdrproc_t) xdr_tt_delete_session_args,
|
(xdrproc_t) xdr_tt_delete_session_args,
|
||||||
(caddr_t) args,
|
(caddr_t) args,
|
||||||
(xdrproc_t) xdr_tt_delete_session_results,
|
(xdrproc_t) xdr_tt_delete_session_results,
|
||||||
|
|
|
@ -1523,7 +1523,7 @@ _tt_db_results *_tt_queue_message_1 (_tt_queue_msg_args *args,
|
||||||
_tt_get_rpc_strings(args->ptypes, message_info->ptypes);
|
_tt_get_rpc_strings(args->ptypes, message_info->ptypes);
|
||||||
|
|
||||||
// Get the XDR size of the new message info structure
|
// Get the XDR size of the new message info structure
|
||||||
u_int length;
|
u_int length = 0;
|
||||||
if (!message_info->xdr((XDR *)xdrsz)) {
|
if (!message_info->xdr((XDR *)xdrsz)) {
|
||||||
results = TT_DB_ERR_ILLEGAL_MESSAGE;
|
results = TT_DB_ERR_ILLEGAL_MESSAGE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -193,7 +193,7 @@ _Tt_db_results _Tt_db_client::connectToDB (const _Tt_string &hostname)
|
||||||
// If dbVersion == 1, then we are talking to an old DB server
|
// If dbVersion == 1, then we are talking to an old DB server
|
||||||
static _tt_auth_level_results results;
|
static _tt_auth_level_results results;
|
||||||
|
|
||||||
char *path = "";
|
const char *path = "";
|
||||||
clnt_stat rpc_status;
|
clnt_stat rpc_status;
|
||||||
int *result = (int *)NULL;
|
int *result = (int *)NULL;
|
||||||
result = _tt_min_auth_level_1(&path, dbServer, &rpc_status);
|
result = _tt_min_auth_level_1(&path, dbServer, &rpc_status);
|
||||||
|
@ -1247,7 +1247,6 @@ _Tt_db_client::dequeueMessages (const _Tt_string &file,
|
||||||
const _Tt_string_list_ptr &ptypes,
|
const _Tt_string_list_ptr &ptypes,
|
||||||
_Tt_message_list_ptr &messages)
|
_Tt_message_list_ptr &messages)
|
||||||
{
|
{
|
||||||
_Tt_db_results retval;
|
|
||||||
_tt_dequeue_msgs_args args;
|
_tt_dequeue_msgs_args args;
|
||||||
|
|
||||||
args.file = (char *)file;
|
args.file = (char *)file;
|
||||||
|
@ -1265,7 +1264,6 @@ _Tt_db_client::dequeueMessages (const _Tt_string &file,
|
||||||
}
|
}
|
||||||
|
|
||||||
_tt_get_rpc_messages(results->messages, messages);
|
_tt_get_rpc_messages(results->messages, messages);
|
||||||
retval = results->results;
|
|
||||||
if (dbVersion==1) {
|
if (dbVersion==1) {
|
||||||
_tt_free_rpc_messages(results->messages);
|
_tt_free_rpc_messages(results->messages);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -562,7 +562,7 @@ _Tt_string _Tt_db_file::getNetworkPath (const _Tt_string &file)
|
||||||
_Tt_string hostname;
|
_Tt_string hostname;
|
||||||
_Tt_string partition;
|
_Tt_string partition;
|
||||||
|
|
||||||
_Tt_db_results results = _tt_db_network_path(file,
|
_tt_db_network_path(file,
|
||||||
local_path,
|
local_path,
|
||||||
hostname,
|
hostname,
|
||||||
partition,
|
partition,
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
|
|
||||||
_Tt_db_key::_Tt_db_key (short version_number)
|
_Tt_db_key::_Tt_db_key (short version_number)
|
||||||
{
|
{
|
||||||
static long last_time_sec = 0;
|
static unsigned int last_time_sec = 0;
|
||||||
static long counter = 0;
|
static long counter = 0;
|
||||||
|
|
||||||
key.version = version_number;
|
key.version = version_number;
|
||||||
|
|
|
@ -82,7 +82,7 @@ _tt_get_rpc_messages (const _tt_message_list &rpc_messages,
|
||||||
if (rpc_messages.messages_len) {
|
if (rpc_messages.messages_len) {
|
||||||
messages = new _Tt_message_list;
|
messages = new _Tt_message_list;
|
||||||
|
|
||||||
for (int i=0; i < rpc_messages.messages_len; i++) {
|
for (unsigned int i=0; i < rpc_messages.messages_len; i++) {
|
||||||
_Tt_message_ptr message_ptr;
|
_Tt_message_ptr message_ptr;
|
||||||
|
|
||||||
_tt_get_rpc_message(rpc_messages.messages_val [i],
|
_tt_get_rpc_message(rpc_messages.messages_val [i],
|
||||||
|
|
|
@ -73,7 +73,7 @@ void _tt_free_rpc_message (const _tt_message &rpc_message)
|
||||||
void _tt_free_rpc_messages (const _tt_message_list &rpc_messages)
|
void _tt_free_rpc_messages (const _tt_message_list &rpc_messages)
|
||||||
{
|
{
|
||||||
if (rpc_messages.messages_val) {
|
if (rpc_messages.messages_val) {
|
||||||
for (int i=0; i < rpc_messages.messages_len; i++) {
|
for (unsigned int i=0; i < rpc_messages.messages_len; i++) {
|
||||||
_tt_free_rpc_message(rpc_messages.messages_val [i]);
|
_tt_free_rpc_message(rpc_messages.messages_val [i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ void _tt_free_rpc_messages (const _tt_message_list &rpc_messages)
|
||||||
void _tt_free_rpc_strings (const _tt_string_list &rpc_strings)
|
void _tt_free_rpc_strings (const _tt_string_list &rpc_strings)
|
||||||
{
|
{
|
||||||
if (rpc_strings.values_val) {
|
if (rpc_strings.values_val) {
|
||||||
for (int i=0; i < rpc_strings.values_len; i++) {
|
for (unsigned int i=0; i < rpc_strings.values_len; i++) {
|
||||||
if (rpc_strings.values_val [i].value) {
|
if (rpc_strings.values_val [i].value) {
|
||||||
free(rpc_strings.values_val [i].value);
|
free(rpc_strings.values_val [i].value);
|
||||||
}
|
}
|
||||||
|
@ -101,7 +101,7 @@ void _tt_free_rpc_property (const _tt_property &rpc_prop)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rpc_prop.values.values_val) {
|
if (rpc_prop.values.values_val) {
|
||||||
for (int i=0; i < rpc_prop.values.values_len; i++) {
|
for (unsigned int i=0; i < rpc_prop.values.values_len; i++) {
|
||||||
if (rpc_prop.values.values_val [i].value.value_val) {
|
if (rpc_prop.values.values_val [i].value.value_val) {
|
||||||
free(rpc_prop.values.values_val [i].value.value_val);
|
free(rpc_prop.values.values_val [i].value.value_val);
|
||||||
}
|
}
|
||||||
|
@ -114,7 +114,7 @@ void _tt_free_rpc_property (const _tt_property &rpc_prop)
|
||||||
void _tt_free_rpc_properties (const _tt_property_list &rpc_props)
|
void _tt_free_rpc_properties (const _tt_property_list &rpc_props)
|
||||||
{
|
{
|
||||||
if (rpc_props.properties_val) {
|
if (rpc_props.properties_val) {
|
||||||
for (int i=0; i < rpc_props.properties_len; i++) {
|
for (unsigned int i=0; i < rpc_props.properties_len; i++) {
|
||||||
_tt_free_rpc_property(rpc_props.properties_val [i]);
|
_tt_free_rpc_property(rpc_props.properties_val [i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -137,7 +137,7 @@ void _tt_get_rpc_strings (const _tt_string_list &rpc_strings,
|
||||||
strings = new _Tt_string_list;
|
strings = new _Tt_string_list;
|
||||||
|
|
||||||
if (rpc_strings.values_len) {
|
if (rpc_strings.values_len) {
|
||||||
for (int i=0; i < rpc_strings.values_len; i++) {
|
for (unsigned int i=0; i < rpc_strings.values_len; i++) {
|
||||||
(void)strings->append(_Tt_string(rpc_strings.values_val [i].value));
|
(void)strings->append(_Tt_string(rpc_strings.values_val [i].value));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -151,7 +151,7 @@ void _tt_get_rpc_property (const _tt_property &rpc_prop,
|
||||||
if (rpc_prop.name) {
|
if (rpc_prop.name) {
|
||||||
prop->name = rpc_prop.name;
|
prop->name = rpc_prop.name;
|
||||||
|
|
||||||
for (int i=0; i < rpc_prop.values.values_len; i++) {
|
for (unsigned int i=0; i < rpc_prop.values.values_len; i++) {
|
||||||
int prop_value_length = rpc_prop.values.values_val [i].value.value_len;
|
int prop_value_length = rpc_prop.values.values_val [i].value.value_len;
|
||||||
if (prop_value_length) {
|
if (prop_value_length) {
|
||||||
_Tt_string prop_value(prop_value_length);
|
_Tt_string prop_value(prop_value_length);
|
||||||
|
@ -171,7 +171,7 @@ void _tt_get_rpc_properties (const _tt_property_list &rpc_props,
|
||||||
props = new _Tt_db_property_list;
|
props = new _Tt_db_property_list;
|
||||||
|
|
||||||
if (rpc_props.properties_len) {
|
if (rpc_props.properties_len) {
|
||||||
for (int i=0; i < rpc_props.properties_len; i++) {
|
for (unsigned int i=0; i < rpc_props.properties_len; i++) {
|
||||||
_Tt_db_property_ptr prop;
|
_Tt_db_property_ptr prop;
|
||||||
|
|
||||||
_tt_get_rpc_property (rpc_props.properties_val [i], prop);
|
_tt_get_rpc_property (rpc_props.properties_val [i], prop);
|
||||||
|
|
|
@ -57,7 +57,7 @@ _Tt_auth::
|
||||||
Tt_status _Tt_auth::
|
Tt_status _Tt_auth::
|
||||||
generate_auth_cookie()
|
generate_auth_cookie()
|
||||||
{
|
{
|
||||||
static char *funcname = "_Tt_auth::make_auth_cookie()";
|
static const char *funcname = "_Tt_auth::make_auth_cookie()";
|
||||||
_tt_AuthFileEntry *entry;
|
_tt_AuthFileEntry *entry;
|
||||||
int exists;
|
int exists;
|
||||||
char *filename;
|
char *filename;
|
||||||
|
@ -79,7 +79,7 @@ generate_auth_cookie()
|
||||||
_TT_ICEAUTH_DEFAULT_RETRIES,
|
_TT_ICEAUTH_DEFAULT_RETRIES,
|
||||||
_TT_ICEAUTH_DEFAULT_TIMEOUT,
|
_TT_ICEAUTH_DEFAULT_TIMEOUT,
|
||||||
_TT_ICEAUTH_DEFAULT_DEADTIME))) {
|
_TT_ICEAUTH_DEFAULT_DEADTIME))) {
|
||||||
char *reason = "unknown error";
|
const char *reason = "unknown error";
|
||||||
|
|
||||||
_tt_UnlockAuthFile(filename);
|
_tt_UnlockAuthFile(filename);
|
||||||
if (retval == _tt_AuthLockTimeout) {
|
if (retval == _tt_AuthLockTimeout) {
|
||||||
|
@ -151,7 +151,7 @@ cleanup:
|
||||||
Tt_status _Tt_auth::
|
Tt_status _Tt_auth::
|
||||||
read_auth_entries(FILE *fp, _tt_AuthFileEntryList **headp)
|
read_auth_entries(FILE *fp, _tt_AuthFileEntryList **headp)
|
||||||
{
|
{
|
||||||
static char *funcname = "_Tt_auth::read_auth_entries()";
|
static const char *funcname = "_Tt_auth::read_auth_entries()";
|
||||||
_tt_AuthFileEntry *entry;
|
_tt_AuthFileEntry *entry;
|
||||||
_tt_AuthFileEntryList *head;
|
_tt_AuthFileEntryList *head;
|
||||||
_tt_AuthFileEntryList *el_new;
|
_tt_AuthFileEntryList *el_new;
|
||||||
|
@ -189,7 +189,7 @@ read_auth_entries(FILE *fp, _tt_AuthFileEntryList **headp)
|
||||||
Tt_status _Tt_auth::
|
Tt_status _Tt_auth::
|
||||||
read_auth_file(char *filename)
|
read_auth_file(char *filename)
|
||||||
{
|
{
|
||||||
static char *funcname = "Tt_auth::read_auth_file()";
|
static const char *funcname = "Tt_auth::read_auth_file()";
|
||||||
FILE *authfp;
|
FILE *authfp;
|
||||||
Tt_status status = TT_OK;
|
Tt_status status = TT_OK;
|
||||||
|
|
||||||
|
@ -213,7 +213,7 @@ read_auth_file(char *filename)
|
||||||
Tt_status _Tt_auth::
|
Tt_status _Tt_auth::
|
||||||
modify_auth_entry(_tt_AuthFileEntry *entry, _tt_AuthFileEntryList **headp)
|
modify_auth_entry(_tt_AuthFileEntry *entry, _tt_AuthFileEntryList **headp)
|
||||||
{
|
{
|
||||||
static char *funcname = "Tt_auth::modify_auth_entry()";
|
static const char *funcname = "Tt_auth::modify_auth_entry()";
|
||||||
_tt_AuthFileEntryList *list, *prev, *el_new;
|
_tt_AuthFileEntryList *list, *prev, *el_new;
|
||||||
|
|
||||||
for (prev=NULL, list=*headp; list; list=list->next) {
|
for (prev=NULL, list=*headp; list; list=list->next) {
|
||||||
|
@ -253,8 +253,8 @@ modify_auth_entry(_tt_AuthFileEntry *entry, _tt_AuthFileEntryList **headp)
|
||||||
Tt_status _Tt_auth::
|
Tt_status _Tt_auth::
|
||||||
write_auth_file(char *filename)
|
write_auth_file(char *filename)
|
||||||
{
|
{
|
||||||
static char *funcname = "Tt_auth::write_auth_file()";
|
static const char *funcname = "Tt_auth::write_auth_file()";
|
||||||
static char *suffix = "-n";
|
static const char *suffix = "-n";
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
_tt_AuthFileEntryList *list;
|
_tt_AuthFileEntryList *list;
|
||||||
char *tmpnam;
|
char *tmpnam;
|
||||||
|
@ -300,7 +300,7 @@ retrieve_auth_cookie()
|
||||||
_tt_AuthFileEntry *entry = NULL;
|
_tt_AuthFileEntry *entry = NULL;
|
||||||
|
|
||||||
entry = _tt_GetAuthFileEntry(_TT_ICEAUTH_PROTOCOL_NAME,
|
entry = _tt_GetAuthFileEntry(_TT_ICEAUTH_PROTOCOL_NAME,
|
||||||
(char*) _sessionid,
|
_sessionid,
|
||||||
_TT_ICEAUTH_AUTH_NAME);
|
_TT_ICEAUTH_AUTH_NAME);
|
||||||
if (NULL == entry)
|
if (NULL == entry)
|
||||||
return TT_AUTHFILE_ENTRY_MISSING;
|
return TT_AUTHFILE_ENTRY_MISSING;
|
||||||
|
|
|
@ -340,7 +340,7 @@ _tt_WriteAuthFileEntry(FILE *auth_file, _tt_AuthFileEntry *auth)
|
||||||
|
|
||||||
|
|
||||||
_tt_AuthFileEntry *
|
_tt_AuthFileEntry *
|
||||||
_tt_GetAuthFileEntry(char *protocol_name, char *network_id, char *auth_name)
|
_tt_GetAuthFileEntry(const char *protocol_name, const char *network_id, const char *auth_name)
|
||||||
{
|
{
|
||||||
FILE *auth_file;
|
FILE *auth_file;
|
||||||
char *filename;
|
char *filename;
|
||||||
|
|
|
@ -126,9 +126,9 @@ extern int _tt_WriteAuthFileEntry (
|
||||||
);
|
);
|
||||||
|
|
||||||
extern _tt_AuthFileEntry *_tt_GetAuthFileEntry (
|
extern _tt_AuthFileEntry *_tt_GetAuthFileEntry (
|
||||||
char * /* protocol_name */,
|
const char * /* protocol_name */,
|
||||||
char * /* network_id */,
|
const char * /* network_id */,
|
||||||
char * /* auth_name */
|
const char * /* auth_name */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern char *_tt_GenerateMagicCookie (
|
extern char *_tt_GenerateMagicCookie (
|
||||||
|
|
|
@ -340,7 +340,6 @@ commit()
|
||||||
Tt_status _Tt_c_procid::
|
Tt_status _Tt_c_procid::
|
||||||
init()
|
init()
|
||||||
{
|
{
|
||||||
int rpc_version = TT_RPC_VERSION;
|
|
||||||
Tt_status status;
|
Tt_status status;
|
||||||
|
|
||||||
if (_default_session.is_null()) {
|
if (_default_session.is_null()) {
|
||||||
|
|
|
@ -79,7 +79,6 @@ c_init()
|
||||||
{
|
{
|
||||||
_Tt_string start_ttcmd;
|
_Tt_string start_ttcmd;
|
||||||
int tried = 0;
|
int tried = 0;
|
||||||
int done = 0;
|
|
||||||
Tt_status status;
|
Tt_status status;
|
||||||
|
|
||||||
if (env() == _TT_ENV_X11) {
|
if (env() == _TT_ENV_X11) {
|
||||||
|
|
|
@ -222,7 +222,6 @@ _Tt_pattern::add_netfile(
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
_Tt_string abspath;
|
_Tt_string abspath;
|
||||||
Tt_status status = TT_OK;
|
|
||||||
int __scopes = scopes();
|
int __scopes = scopes();
|
||||||
|
|
||||||
if ((__scopes&(1<<TT_FILE)) || (__scopes&(1<<TT_BOTH))) {
|
if ((__scopes&(1<<TT_FILE)) || (__scopes&(1<<TT_BOTH))) {
|
||||||
|
|
|
@ -123,8 +123,6 @@ init(_Tt_host_ptr &host, int program, int version,
|
||||||
uid_t servuid, _Tt_auth &auth)
|
uid_t servuid, _Tt_auth &auth)
|
||||||
{
|
{
|
||||||
int optval;
|
int optval;
|
||||||
static caddr_t saved_opaque = 0;
|
|
||||||
static int saved_len = 0;
|
|
||||||
|
|
||||||
optval = (_socket == RPC_ANYSOCK);
|
optval = (_socket == RPC_ANYSOCK);
|
||||||
_auth = auth;
|
_auth = auth;
|
||||||
|
|
|
@ -1659,7 +1659,9 @@ _ttdt_posix_cb(
|
||||||
char *categoryName, *variable, *value;
|
char *categoryName, *variable, *value;
|
||||||
int category, i;
|
int category, i;
|
||||||
struct utsname names;
|
struct utsname names;
|
||||||
|
#if defined(OPT_SYSINFO)
|
||||||
char buf[ SYS_NMLN ];
|
char buf[ SYS_NMLN ];
|
||||||
|
#endif
|
||||||
case TTDT_SET_LOCALE:
|
case TTDT_SET_LOCALE:
|
||||||
return _ttDtGetLocaleCB( msg, pat, (void *)_ttDtApplyLocale, 0 );
|
return _ttDtGetLocaleCB( msg, pat, (void *)_ttDtApplyLocale, 0 );
|
||||||
case TTDT_GET_LOCALE:
|
case TTDT_GET_LOCALE:
|
||||||
|
|
|
@ -127,7 +127,7 @@ _TttkList2Free::_TttkList2Free(
|
||||||
if (_items == 0) {
|
if (_items == 0) {
|
||||||
_max = 0;
|
_max = 0;
|
||||||
}
|
}
|
||||||
for (int i = 0; i < _max; i++) {
|
for (unsigned int i = 0; i < _max; i++) {
|
||||||
_items[ i ] = new _TttkItem2Free();
|
_items[ i ] = new _TttkItem2Free();
|
||||||
if (_items[ i ] == 0) {
|
if (_items[ i ] == 0) {
|
||||||
_destruct();
|
_destruct();
|
||||||
|
@ -188,7 +188,7 @@ _TttkList2Free::operator +=(
|
||||||
void
|
void
|
||||||
_TttkList2Free::flush()
|
_TttkList2Free::flush()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < _num; i++) {
|
for (unsigned int i = 0; i < _num; i++) {
|
||||||
_item( i ) = (caddr_t)0;
|
_item( i ) = (caddr_t)0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -200,7 +200,7 @@ _TttkList2Free::_destruct()
|
||||||
#ifdef OPT_VECNEW
|
#ifdef OPT_VECNEW
|
||||||
delete [] _items;
|
delete [] _items;
|
||||||
#else
|
#else
|
||||||
for (int i = 0; i < _max; i++) {
|
for (unsigned int i = 0; i < _max; i++) {
|
||||||
if (_items[ i ] != 0) {
|
if (_items[ i ] != 0) {
|
||||||
delete _items[ i ];
|
delete _items[ i ];
|
||||||
_items[ i ] = 0;
|
_items[ i ] = 0;
|
||||||
|
|
|
@ -63,10 +63,11 @@ void *_tt_error_pointer(Tt_status s);
|
||||||
// loop iteration. All this in the name of coding efficiency.
|
// loop iteration. All this in the name of coding efficiency.
|
||||||
//
|
//
|
||||||
Tt_status _Tt_audit::
|
Tt_status _Tt_audit::
|
||||||
entry(char *argskey, _Tt_entry_pt func, ...)
|
entry(const char *argskey, _Tt_entry_pt func, ...)
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
char c, *preview, *cp;
|
char c, *cp;
|
||||||
|
const char *preview;
|
||||||
int num_args = strlen(argskey);
|
int num_args = strlen(argskey);
|
||||||
Tt_message m;
|
Tt_message m;
|
||||||
_Tt_c_message_ptr msg;
|
_Tt_c_message_ptr msg;
|
||||||
|
|
|
@ -40,6 +40,6 @@
|
||||||
|
|
||||||
class _Tt_audit: public _Tt_trace {
|
class _Tt_audit: public _Tt_trace {
|
||||||
public:
|
public:
|
||||||
Tt_status entry(char *argskey, _Tt_entry_pt func, ...);
|
Tt_status entry(const char *argskey, _Tt_entry_pt func, ...);
|
||||||
};
|
};
|
||||||
#endif /* TT_AUDIT_H */
|
#endif /* TT_AUDIT_H */
|
||||||
|
|
|
@ -286,7 +286,7 @@ const char *
|
||||||
_tt_enumname(Tt_feature x) {
|
_tt_enumname(Tt_feature x) {
|
||||||
switch (x) {
|
switch (x) {
|
||||||
TTC(TT_FEATURE_MULTITHREADED);
|
TTC(TT_FEATURE_MULTITHREADED);
|
||||||
case TT_STATE_LAST:
|
case _TT_FEATURE_LAST:
|
||||||
default:
|
default:
|
||||||
return "! Tt_feature";
|
return "! Tt_feature";
|
||||||
}
|
}
|
||||||
|
|
|
@ -177,7 +177,7 @@ init_bystringaddr(_Tt_string addr)
|
||||||
ip_address = &ip_address_buf;
|
ip_address = &ip_address_buf;
|
||||||
|
|
||||||
*ip_address = inet_addr((char *)addr);
|
*ip_address = inet_addr((char *)addr);
|
||||||
if (*ip_address == -1) {
|
if (*ip_address == INADDR_NONE) {
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -307,7 +307,6 @@ _cache_it(_Tt_hostname_cache_ptr cache_ptr, _Tt_string & hostname)
|
||||||
_Tt_hostname_cache_ptr sh, lh;
|
_Tt_hostname_cache_ptr sh, lh;
|
||||||
struct hostent *host_ret;
|
struct hostent *host_ret;
|
||||||
_Xgethostbynameparams host_buf;
|
_Xgethostbynameparams host_buf;
|
||||||
int failed = 0;
|
|
||||||
char **h_addr_list;
|
char **h_addr_list;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -271,7 +271,7 @@ _Tt_trace::entry(
|
||||||
(*_pstream)->set_is_entered(0);
|
(*_pstream)->set_is_entered(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *s;
|
const char *s = 0;
|
||||||
int printmsg = 1;
|
int printmsg = 1;
|
||||||
//
|
//
|
||||||
// We do not print msg if it is a (often incomplete) update
|
// We do not print msg if it is a (often incomplete) update
|
||||||
|
@ -347,7 +347,7 @@ _Tt_trace::entry(
|
||||||
//
|
//
|
||||||
void
|
void
|
||||||
_Tt_trace::entry(
|
_Tt_trace::entry(
|
||||||
char *argskey,
|
const char *argskey,
|
||||||
_Tt_entry_pt func,
|
_Tt_entry_pt func,
|
||||||
va_list ap
|
va_list ap
|
||||||
)
|
)
|
||||||
|
@ -373,7 +373,8 @@ _Tt_trace::entry(
|
||||||
(*_pstream)->set_is_entered(0);
|
(*_pstream)->set_is_entered(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
char c, *preview;
|
char c;
|
||||||
|
const char *preview;
|
||||||
int num_args = strlen(argskey);
|
int num_args = strlen(argskey);
|
||||||
|
|
||||||
// print the API name and open paren
|
// print the API name and open paren
|
||||||
|
|
|
@ -130,7 +130,7 @@ class _Tt_trace : public _Tt_allocated {
|
||||||
|
|
||||||
// API tracing entry call
|
// API tracing entry call
|
||||||
void entry(
|
void entry(
|
||||||
char *argskey,
|
const char *argskey,
|
||||||
_Tt_entry_pt func,
|
_Tt_entry_pt func,
|
||||||
va_list ap
|
va_list ap
|
||||||
);
|
);
|
||||||
|
|
|
@ -138,7 +138,7 @@ operator <<(
|
||||||
os << _tt_enumname( msg.message_class() );
|
os << _tt_enumname( msg.message_class() );
|
||||||
os << " <" << msg.api_id() << "> ";
|
os << " <" << msg.api_id() << "> ";
|
||||||
os << _tt_enumname( msg.state() );
|
os << _tt_enumname( msg.state() );
|
||||||
char *conjunction = " because ";
|
const char *conjunction = " because ";
|
||||||
switch (msg.state()) {
|
switch (msg.state()) {
|
||||||
case TT_CREATED:
|
case TT_CREATED:
|
||||||
case TT_SENT:
|
case TT_SENT:
|
||||||
|
|
|
@ -129,7 +129,7 @@ _tt_xdr_sizeof(xdrproc_t f, void *data)
|
||||||
|
|
||||||
_Tt_xdr_size_stream::
|
_Tt_xdr_size_stream::
|
||||||
_Tt_xdr_size_stream() {
|
_Tt_xdr_size_stream() {
|
||||||
memset ((char *)&ops, 0, sizeof ops);
|
memset (&ops, 0, sizeof ops);
|
||||||
#if defined(OPT_BUG_SUNOS_4) || defined(OPT_BUG_HPUX)
|
#if defined(OPT_BUG_SUNOS_4) || defined(OPT_BUG_HPUX)
|
||||||
ops.x_putlong = (int (*)(...))tt_x_putlong;
|
ops.x_putlong = (int (*)(...))tt_x_putlong;
|
||||||
ops.x_putbytes = (int (*)(...))tt_x_putbytes;
|
ops.x_putbytes = (int (*)(...))tt_x_putbytes;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue