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;
|
Prop_ptr sp;
|
||||||
_Tt_string_list_cursor v;
|
_Tt_string_list_cursor v;
|
||||||
_Tt_db_property_ptr dbprop = new _Tt_db_property();
|
_Tt_db_property_ptr dbprop = new _Tt_db_property();
|
||||||
uid_t euid;
|
uid_t euid = 0;
|
||||||
gid_t group;
|
gid_t group = 0;
|
||||||
mode_t mode;
|
mode_t mode = 0;
|
||||||
int owner_written = 0;
|
int owner_written = 0;
|
||||||
int group_written = 0;
|
int group_written = 0;
|
||||||
int mode_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);
|
_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;
|
||||||
_Tt_xdr_size_stream xdrsz;
|
_Tt_xdr_size_stream xdrsz;
|
||||||
if (!message_info->xdr((XDR *)xdrsz)) {
|
if (!message_info->xdr((XDR *)xdrsz)) {
|
||||||
results = TT_DB_ERR_ILLEGAL_MESSAGE;
|
results = TT_DB_ERR_ILLEGAL_MESSAGE;
|
||||||
|
|
|
@ -56,11 +56,11 @@ _isbtree_insert(Btree *btree, char *key)
|
||||||
Keydesc2 *pkeydesc2 = btree->keydesc2;
|
Keydesc2 *pkeydesc2 = btree->keydesc2;
|
||||||
int keylength = pkeydesc2->k2_len;
|
int keylength = pkeydesc2->k2_len;
|
||||||
int nkeys; /* Number of keys in the page */
|
int nkeys; /* Number of keys in the page */
|
||||||
int capac;
|
int capac = 0;
|
||||||
char keybuf[MAXKEYSIZE];
|
char keybuf[MAXKEYSIZE];
|
||||||
int i;
|
int i;
|
||||||
Blkno blkno;
|
Blkno blkno;
|
||||||
char *pkp, *pkp2, *pkp3;
|
char *pkp = NULL, *pkp2, *pkp3;
|
||||||
Bufhdr *kp2bhdr, *kp3bhdr;
|
Bufhdr *kp2bhdr, *kp3bhdr;
|
||||||
Blkno blkno2, blkno3;
|
Blkno blkno2, blkno3;
|
||||||
int level;
|
int level;
|
||||||
|
|
|
@ -149,13 +149,13 @@ _amread(Bytearray *isfhandle, char *record, int *reclen,
|
||||||
struct errcode *errcode)
|
struct errcode *errcode)
|
||||||
{
|
{
|
||||||
Fcb *fcb = NULL;
|
Fcb *fcb = NULL;
|
||||||
Recno recnum2;
|
Recno recnum2 = 0;
|
||||||
int err;
|
int err;
|
||||||
Crp *crp;
|
Crp *crp;
|
||||||
Btree *btree = NULL;
|
Btree *btree = NULL;
|
||||||
Keydesc2 *pkeydesc2;
|
Keydesc2 *pkeydesc2;
|
||||||
char keybuf1[MAXKEYSIZE], keybuf2[MAXKEYSIZE];
|
char keybuf1[MAXKEYSIZE], keybuf2[MAXKEYSIZE];
|
||||||
char *pkey, *pkeynext;
|
char *pkey = NULL, *pkeynext;
|
||||||
int skipbytes;
|
int skipbytes;
|
||||||
int ret;
|
int ret;
|
||||||
Bytearray oldcurpos;
|
Bytearray oldcurpos;
|
||||||
|
|
|
@ -158,7 +158,7 @@ _amstart(Bytearray *isfhandle, char *record, int *reclen,
|
||||||
Bytearray *curpos, Recno *recnum, struct errcode *errcode)
|
Bytearray *curpos, Recno *recnum, struct errcode *errcode)
|
||||||
{
|
{
|
||||||
Fcb *fcb;
|
Fcb *fcb;
|
||||||
Recno recnum2;
|
Recno recnum2 = 0;
|
||||||
int err;
|
int err;
|
||||||
Crp *newcrp = NULL;
|
Crp *newcrp = NULL;
|
||||||
char recbuf [ISMAXRECLEN];
|
char recbuf [ISMAXRECLEN];
|
||||||
|
|
|
@ -632,10 +632,12 @@ update_message(const _Tt_message_ptr &m, Tt_state newstate)
|
||||||
// delivered messages, update the message and then
|
// delivered messages, update the message and then
|
||||||
// change it to its new state.
|
// change it to its new state.
|
||||||
|
|
||||||
_Tt_dispatch_reason reason;
|
_Tt_dispatch_reason reason ;
|
||||||
|
|
||||||
while (mcursor.next()) {
|
while (mcursor.next()) {
|
||||||
if (mcursor->is_equal(m)) {
|
if (mcursor->is_equal(m)) {
|
||||||
|
bool recognised_state = false;
|
||||||
|
|
||||||
dm = (_Tt_s_message *)(*mcursor).c_pointer();
|
dm = (_Tt_s_message *)(*mcursor).c_pointer();
|
||||||
mcursor.remove();
|
mcursor.remove();
|
||||||
if (dm.c_pointer() != m.c_pointer()) {
|
if (dm.c_pointer() != m.c_pointer()) {
|
||||||
|
@ -649,26 +651,35 @@ update_message(const _Tt_message_ptr &m, Tt_state newstate)
|
||||||
switch (newstate) {
|
switch (newstate) {
|
||||||
case TT_FAILED:
|
case TT_FAILED:
|
||||||
reason = TTDR_MESSAGE_FAIL;
|
reason = TTDR_MESSAGE_FAIL;
|
||||||
|
recognised_state = true;
|
||||||
break;
|
break;
|
||||||
case TT_REJECTED:
|
case TT_REJECTED:
|
||||||
reason = TTDR_MESSAGE_REJECT;
|
reason = TTDR_MESSAGE_REJECT;
|
||||||
|
recognised_state = true;
|
||||||
break;
|
break;
|
||||||
case TT_HANDLED:
|
case TT_HANDLED:
|
||||||
reason = TTDR_MESSAGE_REPLY;
|
reason = TTDR_MESSAGE_REPLY;
|
||||||
|
recognised_state = true;
|
||||||
break;
|
break;
|
||||||
case TT_ACCEPTED:
|
case TT_ACCEPTED:
|
||||||
reason = TTDR_MESSAGE_ACCEPT;
|
reason = TTDR_MESSAGE_ACCEPT;
|
||||||
|
recognised_state = true;
|
||||||
break;
|
break;
|
||||||
case TT_ABSTAINED:
|
case TT_ABSTAINED:
|
||||||
reason = TTDR_MESSAGE_ABSTAIN;
|
reason = TTDR_MESSAGE_ABSTAIN;
|
||||||
|
recognised_state = true;
|
||||||
break;
|
break;
|
||||||
|
// default:
|
||||||
|
/* TODO what is the default reason? */
|
||||||
}
|
}
|
||||||
#ifdef OPT_BUG_SUNOS_5
|
#ifdef OPT_BUG_SUNOS_5
|
||||||
{
|
{
|
||||||
#endif
|
#endif
|
||||||
// Keep this in sync with ::add_message()
|
// Keep this in sync with ::add_message()
|
||||||
_Tt_msg_trace trace( *dm, reason );
|
if(recognised_state) {
|
||||||
dm->change_state(this, newstate, trace);
|
_Tt_msg_trace trace( *dm, reason );
|
||||||
|
dm->change_state(this, newstate, trace);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef OPT_BUG_SUNOS_5
|
#ifdef OPT_BUG_SUNOS_5
|
||||||
// SunPro cfront calls
|
// SunPro cfront calls
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue