mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
libtt: Resolve uninitialized warningss
This commit is contained in:
parent
31774af2f2
commit
35e94e3878
6 changed files with 23 additions and 12 deletions
|
@ -151,9 +151,9 @@ const char* MP_TYPE_PROP = "_NODE_TYPE";
|
|||
Prop_ptr sp;
|
||||
_Tt_string_list_cursor v;
|
||||
_Tt_db_property_ptr dbprop = new _Tt_db_property();
|
||||
uid_t euid;
|
||||
gid_t group;
|
||||
mode_t mode;
|
||||
uid_t euid = 0;
|
||||
gid_t group = 0;
|
||||
mode_t mode = 0;
|
||||
int owner_written = 0;
|
||||
int group_written = 0;
|
||||
int mode_written = 0;
|
||||
|
|
|
@ -1553,7 +1553,7 @@ _tt_db_results *_tt_queue_message_1 (_tt_queue_msg_args *args,
|
|||
_tt_get_rpc_strings(args->ptypes, message_info->ptypes);
|
||||
|
||||
// Get the XDR size of the new message info structure
|
||||
u_int length;
|
||||
u_int length = 0;
|
||||
_Tt_xdr_size_stream xdrsz;
|
||||
if (!message_info->xdr((XDR *)xdrsz)) {
|
||||
results = TT_DB_ERR_ILLEGAL_MESSAGE;
|
||||
|
|
|
@ -56,11 +56,11 @@ _isbtree_insert(Btree *btree, char *key)
|
|||
Keydesc2 *pkeydesc2 = btree->keydesc2;
|
||||
int keylength = pkeydesc2->k2_len;
|
||||
int nkeys; /* Number of keys in the page */
|
||||
int capac;
|
||||
int capac = 0;
|
||||
char keybuf[MAXKEYSIZE];
|
||||
int i;
|
||||
Blkno blkno;
|
||||
char *pkp, *pkp2, *pkp3;
|
||||
char *pkp = NULL, *pkp2, *pkp3;
|
||||
Bufhdr *kp2bhdr, *kp3bhdr;
|
||||
Blkno blkno2, blkno3;
|
||||
int level;
|
||||
|
|
|
@ -149,13 +149,13 @@ _amread(Bytearray *isfhandle, char *record, int *reclen,
|
|||
struct errcode *errcode)
|
||||
{
|
||||
Fcb *fcb = NULL;
|
||||
Recno recnum2;
|
||||
Recno recnum2 = 0;
|
||||
int err;
|
||||
Crp *crp;
|
||||
Btree *btree = NULL;
|
||||
Keydesc2 *pkeydesc2;
|
||||
char keybuf1[MAXKEYSIZE], keybuf2[MAXKEYSIZE];
|
||||
char *pkey, *pkeynext;
|
||||
char *pkey = NULL, *pkeynext;
|
||||
int skipbytes;
|
||||
int ret;
|
||||
Bytearray oldcurpos;
|
||||
|
|
|
@ -158,7 +158,7 @@ _amstart(Bytearray *isfhandle, char *record, int *reclen,
|
|||
Bytearray *curpos, Recno *recnum, struct errcode *errcode)
|
||||
{
|
||||
Fcb *fcb;
|
||||
Recno recnum2;
|
||||
Recno recnum2 = 0;
|
||||
int err;
|
||||
Crp *newcrp = NULL;
|
||||
char recbuf [ISMAXRECLEN];
|
||||
|
|
|
@ -632,10 +632,12 @@ update_message(const _Tt_message_ptr &m, Tt_state newstate)
|
|||
// delivered messages, update the message and then
|
||||
// change it to its new state.
|
||||
|
||||
_Tt_dispatch_reason reason;
|
||||
_Tt_dispatch_reason reason ;
|
||||
|
||||
while (mcursor.next()) {
|
||||
if (mcursor->is_equal(m)) {
|
||||
bool recognised_state = false;
|
||||
|
||||
dm = (_Tt_s_message *)(*mcursor).c_pointer();
|
||||
mcursor.remove();
|
||||
if (dm.c_pointer() != m.c_pointer()) {
|
||||
|
@ -649,26 +651,35 @@ update_message(const _Tt_message_ptr &m, Tt_state newstate)
|
|||
switch (newstate) {
|
||||
case TT_FAILED:
|
||||
reason = TTDR_MESSAGE_FAIL;
|
||||
recognised_state = true;
|
||||
break;
|
||||
case TT_REJECTED:
|
||||
reason = TTDR_MESSAGE_REJECT;
|
||||
recognised_state = true;
|
||||
break;
|
||||
case TT_HANDLED:
|
||||
reason = TTDR_MESSAGE_REPLY;
|
||||
recognised_state = true;
|
||||
break;
|
||||
case TT_ACCEPTED:
|
||||
reason = TTDR_MESSAGE_ACCEPT;
|
||||
recognised_state = true;
|
||||
break;
|
||||
case TT_ABSTAINED:
|
||||
reason = TTDR_MESSAGE_ABSTAIN;
|
||||
recognised_state = true;
|
||||
break;
|
||||
// default:
|
||||
/* TODO what is the default reason? */
|
||||
}
|
||||
#ifdef OPT_BUG_SUNOS_5
|
||||
{
|
||||
#endif
|
||||
// Keep this in sync with ::add_message()
|
||||
_Tt_msg_trace trace( *dm, reason );
|
||||
dm->change_state(this, newstate, trace);
|
||||
if(recognised_state) {
|
||||
_Tt_msg_trace trace( *dm, reason );
|
||||
dm->change_state(this, newstate, trace);
|
||||
}
|
||||
|
||||
#ifdef OPT_BUG_SUNOS_5
|
||||
// SunPro cfront calls
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue