dtmail: Fix XtVaGetValues() return value storage

At least one crash was caused by this
on the 64-bit system
This commit is contained in:
Marcin Cieslak
2012-09-24 13:36:14 +02:00
committed by Jon Trulson
parent 3a246dfb9b
commit 91bfe1e4dc
8 changed files with 48 additions and 33 deletions

View File

@@ -406,7 +406,8 @@ MenuBar::addCommands(
// if(isValidMenuPane(pulldown) == FALSE)
// return NULL;
int i, num_children;
int i;
XtArgVal num_children;
WidgetList children;
Boolean haveNoSeparator;
int newItemIndex, numPBUnmanaged, tmpPBUnmanaged;
@@ -503,7 +504,8 @@ MenuBar::removeOnlyCommands(
// if(isValidMenuPane(pulldown) == FALSE)
// return;
int i, j, num_children;
int i, j;
XtArgVal num_children;
WidgetList children;
XtVaGetValues(pulldown,
@@ -545,7 +547,8 @@ MenuBar::removeCommands(
// if(isValidMenuPane(pulldown) == FALSE)
// return;
int i, j, num_children;
int i, j;
XtArgVal num_children;
WidgetList children;
XtVaGetValues(pulldown,
@@ -615,7 +618,8 @@ MenuBar::changeLabel(
// if(isValidMenuPane(pulldown) == FALSE)
// return;
int managed_widgets, i, num_children;
int managed_widgets, i;
XtArgVal num_children;
WidgetList children;
XmString label;
Widget wid;
@@ -658,7 +662,7 @@ MenuBar::changeLabel(Widget pulldown,
// Locate the appropriate widget in the list.
//
int num_children;
XtArgVal num_children;
char wid_name[200];
XmString label_string = XmStringCreateLocalized((char *)label);
@@ -695,7 +699,8 @@ MenuBar::rotateLabels(
// if(isValidMenuPane(pulldown) == FALSE)
// return;
int num_managed_wids=0, i, j, num_children, num_to_change;
int num_managed_wids=0, i, j, num_to_change;
XtArgVal num_children;
WidgetList children;
XmString label, endlabel;
Widget prevwid, wid;
@@ -805,7 +810,8 @@ MenuBar::removeCommand(
//if(isValidMenuPane(pulldown) == FALSE)
// return;
int managed_widgets, i, num_children;
int managed_widgets, i;
XtArgVal num_children;
WidgetList children;
XtVaGetValues(pulldown,

View File

@@ -111,10 +111,13 @@ void
MenuWindow::getIconColors(Pixel & fore, Pixel & back)
{
if (_menuBar) {
XtArgVal fore0, back0;
XtVaGetValues (_menuBar->baseWidget(),
XmNforeground, &fore,
XmNbackground, &back,
XmNforeground, &fore0,
XmNbackground, &back0,
NULL);
fore = (Pixel) fore0;
back = (Pixel) back0;
}
else {
MainWindow::getIconColors(fore, back);

View File

@@ -347,7 +347,7 @@ int
SelectFileCmd::getHidden()
{
int val;
unsigned char current_state;
XtArgVal current_state;
if (NULL == _fileBrowser || NULL == _hidden_button)
return 0;
@@ -388,8 +388,8 @@ SelectFileCmd::setSelected(char *path)
void
SelectFileCmd::setHidden(int on)
{
unsigned char current_state;
unsigned char desired_state;
XtArgVal current_state;
XtArgVal desired_state;
if (NULL == _fileBrowser || NULL == _hidden_button)
return;