1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

dtwm: Resolve uninitialized warnings

This commit is contained in:
Peter Howkins 2021-12-22 01:14:48 +00:00 committed by Jon Trulson
parent 7a08d8cedc
commit f073bc2e24
11 changed files with 13 additions and 13 deletions

View file

@ -1360,7 +1360,7 @@ PushCB (Widget w,
BoxData * box_data;
SubpanelData * subpanel_data;
ControlData * main_control_data;
ControlData * main_control_data = NULL;
char m_state;

View file

@ -1796,7 +1796,7 @@ ResolveDuplicates (RecordData * record_data,
int i, start_index, lock_index, last_index;
ElementValue * element_values;
int cont_type;
char *cont_name, *record_name;
char *cont_name = NULL, *record_name;
int count = *record_count;
Boolean locked;

View file

@ -1046,7 +1046,7 @@ UpdateMainControlMenu (ControlData * control_data)
long control_type;
Arg args[5];
ElementValue * old_element_values;
ElementValue * old_element_values = NULL;
/* Save element values of control then load values of default control */
@ -1769,7 +1769,7 @@ WSPopupMenu (Widget w,
XmAnyCallbackStruct * callback;
XEvent * event;
Widget form, focus_widget;
SwitchData * switch_data;
SwitchData * switch_data = NULL;
ControlData * control_data = NULL;
Boolean is_button = False;
Position x, y;

View file

@ -2317,7 +2317,7 @@ SwitchButtonCreate (SwitchData * switch_data,
for (i = 0; i < switch_count; i++)
{
int pixel_set_index, map_index;
int pixel_set_index = 1, map_index;
if (one == True)
i = switch_count - 1;

View file

@ -1625,7 +1625,7 @@ RestoreHelpDialogs(
Position xLoc, yLoc;
short columns, rows;
int helpType;
int helpType = DtHELP_TYPE_TOPIC;
char geometry[40];
int wsCnt;
int cCount;

View file

@ -2404,7 +2404,7 @@ RegisterPushRecallClients (
WmFpPushRecallClientList pPRCD,
int count)
{
WmScreenData *pSD;
WmScreenData *pSD = NULL;
int i;
for (i= 0; i < wmGD.numScreens; i++)

View file

@ -377,7 +377,7 @@ void CheckTerminalSeparator(MenuSpec *menuSpec, Widget buttonWidget, Boolean man
static MenuItem *
DuplicateMenuItems (MenuItem *menuItems)
{
MenuItem *newMenuItem = (MenuItem *) NULL, *returnMenuItem, *curMenuItem;
MenuItem *newMenuItem = NULL, *returnMenuItem = NULL, *curMenuItem;
for (curMenuItem = menuItems;
curMenuItem != (MenuItem *) NULL;

View file

@ -1477,7 +1477,7 @@ _DtWmParseExpandEnvironmentVariables (
int lenNonEnv;
int lenEnvVar;
int lenEnvValue;
int lenReturn;
int lenReturn = 0;
int lenSave;
static unsigned char pchDefaultBrk[] = {
DTWM_CHAR_ENVIRONMENT,

View file

@ -4916,7 +4916,7 @@ ProcessDefaultBackdropImages (WmScreenData *pSD)
void
ProcessWorkspaceList (WmScreenData *pSD)
{
int i, wsNameCount, wsNamesAlloced;
int i, wsNameCount = 0, wsNamesAlloced;
WmWorkspaceData *pwsI;
unsigned char *lineP = NULL;
unsigned char *string;

View file

@ -1414,8 +1414,8 @@ ProcessWmNormalHints (ClientData *pCD, Boolean firstTime, long manageFlags)
int diff;
unsigned long decoration;
unsigned int boxdim, tmpMin;
unsigned int oldWidthInc, oldHeightInc;
unsigned int oldBaseWidth, oldBaseHeight;
unsigned int oldWidthInc = 0, oldHeightInc = 0;
unsigned int oldBaseWidth = 0, oldBaseHeight = 0;
unsigned int incWidth, incHeight;
/*

View file

@ -614,7 +614,7 @@ void ConfigureNewState (ClientData *pcd)
}
else
{
long decor;
long decor = WM_DECOR_DEFAULT;
WmHeadInfo_t *WmHI;
if (pcd->isFullscreen)