mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
dtwm: Resolve coverity warnings related to uninitialised variables and missing return statements
This commit is contained in:
parent
ad373101d6
commit
fa29d3776e
13 changed files with 30 additions and 16 deletions
|
@ -973,7 +973,7 @@ SwitchRenameCB (Widget w,
|
|||
SwitchData * switch_data;
|
||||
|
||||
Boolean valid;
|
||||
int current_switch;
|
||||
int current_switch = 0;
|
||||
int i;
|
||||
|
||||
int ac;
|
||||
|
|
|
@ -1219,7 +1219,7 @@ ProcessRecord (DtDtsDbField * fields,
|
|||
int i, j;
|
||||
int entry;
|
||||
|
||||
int keyword_count;
|
||||
int keyword_count = 0;
|
||||
char ** field_keywords;
|
||||
|
||||
|
||||
|
@ -2318,6 +2318,7 @@ AddControlActionList (ControlData * control_data)
|
|||
{
|
||||
/* DtDTS_DA_ACTION_LIST */
|
||||
case 0:
|
||||
free(act_list); /* Remove any previous loop run through */
|
||||
act_list = (char *) strdup(attr_list[i]->value);
|
||||
break;
|
||||
|
||||
|
|
|
@ -137,7 +137,7 @@ DeleteWorkspaceCB (Widget w,
|
|||
|
||||
{
|
||||
long delete_workspace = (long) client_data;
|
||||
SwitchData * switch_data;
|
||||
SwitchData * switch_data = NULL;
|
||||
int i;
|
||||
|
||||
|
||||
|
@ -153,9 +153,12 @@ DeleteWorkspaceCB (Widget w,
|
|||
}
|
||||
}
|
||||
|
||||
if(switch_data)
|
||||
{
|
||||
_DtWsmDeleteWorkspace (panel.shell,
|
||||
switch_data->atom_names[delete_workspace]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -2004,7 +2004,7 @@ SwitchCreate (BoxData * box_data)
|
|||
int switch_count = 1;
|
||||
Atom * atom_names;
|
||||
Atom current_workspace_atom;
|
||||
int current_workspace;
|
||||
int current_workspace = 0;
|
||||
|
||||
Widget switch_button;
|
||||
|
||||
|
@ -3186,7 +3186,7 @@ AddSubpanel (ControlData * control_data)
|
|||
|
||||
{
|
||||
ElementValue * element_values;
|
||||
SubpanelData * subpanel_data;
|
||||
SubpanelData * subpanel_data = NULL;
|
||||
BoxData * box_data = (BoxData *)control_data->parent_data;
|
||||
|
||||
DtWmHints vHints;
|
||||
|
@ -3259,7 +3259,9 @@ AddSubpanel (ControlData * control_data)
|
|||
|
||||
box_data->subpanel_count++;
|
||||
|
||||
if(subpanel_data) {
|
||||
SubpanelCreate (control_data, subpanel_data);
|
||||
}
|
||||
|
||||
|
||||
XtSetArg (al[0], XmNimageName, post_arrow_image);
|
||||
|
|
|
@ -441,9 +441,12 @@ ProcessBackdropResources(
|
|||
pch = NULL;
|
||||
}
|
||||
free (pchImageName); /* temporary string */
|
||||
pchImageName = NULL;
|
||||
free (pchL); /* temporary string */
|
||||
}
|
||||
}
|
||||
|
||||
free (pchImageName);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -566,9 +566,9 @@ void GenerateFrameDisplayLists (ClientData *pcd)
|
|||
int insideBevel, inset, diffBevel;
|
||||
unsigned int nTitleBevel, sTitleBevel, eTitleBevel, wTitleBevel;
|
||||
unsigned int meTitleBevel, inWidth;
|
||||
int x, y, xAdj, yAdj;
|
||||
int x, y, xAdj = 0, yAdj = 0;
|
||||
unsigned int width, height;
|
||||
RList *prlTop, *prlBot;
|
||||
RList *prlTop = NULL, *prlBot = NULL;
|
||||
|
||||
int jX, jY;
|
||||
unsigned int jW, jH;
|
||||
|
|
|
@ -2569,7 +2569,7 @@ void HandleCColormapNotify (ClientData *pCD, XColormapEvent *colorEvent)
|
|||
|
||||
void HandleClientMessage (ClientData *pCD, XClientMessageEvent *clientEvent)
|
||||
{
|
||||
unsigned int newState;
|
||||
unsigned int newState = WITHDRAWN_STATE;
|
||||
|
||||
/*
|
||||
* Process the client message event based on the message_type.
|
||||
|
|
|
@ -610,6 +610,9 @@ PushRecallGetData (char * client_name)
|
|||
for (i = 0; i < panel.push_recall_count; i++)
|
||||
if (strcmp (client_name, push_recall_list[i].pchResName) == 0)
|
||||
return (i);
|
||||
|
||||
/* Should never get here */
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2285,7 +2285,7 @@ F_Push_Recall (String args, ClientData *pCD, XEvent *event)
|
|||
|
||||
if (!bWaiting)
|
||||
{
|
||||
long clientTimeout;
|
||||
long clientTimeout = 0;
|
||||
Arg al[5];
|
||||
int ac;
|
||||
WmPanelistObject pPanelist;
|
||||
|
|
|
@ -2044,6 +2044,8 @@ RestoreHelpDialogs(
|
|||
XrmDestroyDatabase(db);
|
||||
}
|
||||
#endif /* NO_DT */
|
||||
|
||||
return True;
|
||||
} /* END OF FUNCTION RestoreHelpDialogs */
|
||||
|
||||
/*************************************<->*************************************
|
||||
|
|
|
@ -2887,7 +2887,7 @@ void PackIconBox (IconBoxData *pIBD, Boolean packVert, Boolean packHorz, int pas
|
|||
int ix1, ix2;
|
||||
int count;
|
||||
int newX, newY;
|
||||
ClientData *pCD_tmp, *pMyCD;
|
||||
ClientData *pCD_tmp = NULL, *pMyCD;
|
||||
int hasActiveText = 1;
|
||||
Arg args[4];
|
||||
Dimension majorDimension, minorDimension;
|
||||
|
|
|
@ -688,7 +688,7 @@ Boolean HandleResizeKeyPress (ClientData *pcd, XEvent *pev)
|
|||
{
|
||||
KeySym keysym;
|
||||
Boolean control;
|
||||
int warpX, warpY, currentX, currentY, newX, newY;
|
||||
int warpX, warpY, currentX = 0, currentY = 0, newX, newY;
|
||||
int junk, keyMult;
|
||||
Window junk_win;
|
||||
XEvent KeyEvent;
|
||||
|
|
|
@ -485,7 +485,7 @@ getClientWorkspaces(ClientData *pCD)
|
|||
/* Easy but slow way to do this would be to use XGetAtomName(). */
|
||||
/* To avoid XServer round trips (and to weed out invalid WS names) */
|
||||
/* we look through workspaces attached to this screen for ID matches. */
|
||||
char *cwsP, *tmpP, *wsNameP;
|
||||
char *cwsP = NULL, *tmpP, *wsNameP;
|
||||
int pLen = 0;
|
||||
int i;
|
||||
|
||||
|
|
Loading…
Reference in a new issue